From 41cbf6df2566a2f302b7f07f833a231a93337eb9 Mon Sep 17 00:00:00 2001 From: emc3 Date: Mon, 12 Jan 2004 22:27:22 +0000 Subject: [PATCH] create comment_approved column before making the index git-svn-id: http://svn.automattic.com/wordpress/trunk@768 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/upgrade-functions.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/wp-admin/upgrade-functions.php b/wp-admin/upgrade-functions.php index 6241df5b1d..b3c76b8075 100644 --- a/wp-admin/upgrade-functions.php +++ b/wp-admin/upgrade-functions.php @@ -493,14 +493,13 @@ function upgrade_100() { maybe_add_column($tablecategories, 'category_parent', "ALTER TABLE `$tablecategories` ADD `category_parent` INT(4) NOT NULL"); maybe_add_column($tablelinks, 'link_rss', "ALTER TABLE `$tablelinks` ADD `link_rss` VARCHAR( 255 ) NOT NULL;"); maybe_add_column($tableusers, 'user_description', "ALTER TABLE `$tableusers` ADD `user_description` TEXT NOT NULL"); + maybe_add_column($tablecomments, 'comment_approved', "ALTER TABLE $tablecomments ADD COLUMN comment_approved ENUM('0', '1') DEFAULT '1' NOT NULL"); // Create indicies add_clean_index($tableposts, 'post_name'); add_clean_index($tablecategories, 'category_nicename'); add_clean_index($tablecomments, 'comment_approved'); - if (maybe_add_column($tablecomments, 'comment_approved', "ALTER TABLE $tablecomments ADD COLUMN comment_approved ENUM('0', '1') DEFAULT '1' NOT NULL")) { - } // Options stuff if (!$wpdb->get_var("SELECT option_id FROM $tableoptions WHERE option_name = 'comment_moderation'")) {