From 8ff86865db95575168fa6d931b6f0d96aa0203b9 Mon Sep 17 00:00:00 2001 From: Matt Mullenweg Date: Mon, 12 Apr 2004 18:45:02 +0000 Subject: [PATCH] Take the add new gmt fields out of the conditional. git-svn-id: https://develop.svn.wordpress.org/trunk@1063 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/upgrade-functions.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-admin/upgrade-functions.php b/wp-admin/upgrade-functions.php index c7f5c09c1a..9d905e9bbe 100644 --- a/wp-admin/upgrade-functions.php +++ b/wp-admin/upgrade-functions.php @@ -680,6 +680,9 @@ function upgrade_110() { $wpdb->query("ALTER TABLE `$tableposts` CHANGE `comment_status` `comment_status` ENUM( 'open', 'closed', 'registered_only' ) DEFAULT 'open' NOT NULL"); maybe_add_column($tableusers, 'user_nicename', "ALTER TABLE `$tableusers` ADD `user_nicename` VARCHAR(50) DEFAULT '' NOT NULL ;"); + maybe_add_column($tableposts, 'post_date_gmt', "ALTER TABLE $tableposts ADD post_date_gmt DATETIME NOT NULL AFTER post_date"); + maybe_add_column($tableposts, 'post_modified_gmt', "ALTER TABLE $tableposts ADD post_modified_gmt DATETIME NOT NULL AFTER post_modified"); + maybe_add_column($tablecomments, 'comment_date_gmt', "ALTER TABLE $tablecomments ADD comment_date_gmt DATETIME NOT NULL AFTER comment_date"); // Set user_nicename. $users = $wpdb->get_results("SELECT ID, user_nickname, user_nicename FROM $tableusers"); @@ -745,9 +748,6 @@ function upgrade_110() { } } if (!$got_gmt_fields) { - $wpdb->query("ALTER TABLE $tableposts ADD post_date_gmt DATETIME NOT NULL AFTER post_date"); - $wpdb->query("ALTER TABLE $tableposts ADD post_modified_gmt DATETIME NOT NULL AFTER post_modified"); - $wpdb->query("ALTER TABLE $tablecomments ADD comment_date_gmt DATETIME NOT NULL AFTER comment_date"); // Add or substract time to all dates, to get GMT dates $add_hours = intval($diff_gmt_weblogger);