From 724274c8d3f7f6784047ef1b7c2fa572634e879b Mon Sep 17 00:00:00 2001 From: saxmatt Date: Sun, 1 Feb 2004 12:14:28 +0000 Subject: [PATCH] New fields for 1.1. git-svn-id: http://svn.automattic.com/wordpress/trunk@821 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/upgrade-functions.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/wp-admin/upgrade-functions.php b/wp-admin/upgrade-functions.php index 3fe4933b9b..2db0039f65 100644 --- a/wp-admin/upgrade-functions.php +++ b/wp-admin/upgrade-functions.php @@ -6,6 +6,7 @@ function upgrade_all() { upgrade_072(); upgrade_100(); upgrade_101(); + upgrade_110(); } // General @@ -671,4 +672,14 @@ function upgrade_101() { add_clean_index($tablelinks , 'link_visible'); } +function upgrade_110() { + global $wpdb, $tableusers, $tablecomments, $tableposts; + + maybe_add_column($tablecomments, 'user_id', "ALTER TABLE `$tablecomments` ADD `user_id` INT DEFAULT '0' NOT NULL ;"); + maybe_add_column($tableusers, 'user_activation_key', "ALTER TABLE `$tableusers` ADD `user_activation_key` VARCHAR( 60 ) NOT NULL ;"); + maybe_add_column($tableusers, 'user_status', "ALTER TABLE `$tableusers` ADD `user_status` INT DEFAULT '0' NOT NULL ;"); + $wpdb->query("ALTER TABLE `$tableposts` CHANGE `comment_status` `comment_status` ENUM( 'open', 'closed', 'registered_only' ) DEFAULT 'open' NOT NULL"); + +} + ?> \ No newline at end of file