diff --git a/src/wp-admin/includes/schema.php b/src/wp-admin/includes/schema.php index 26063564b1..037210af34 100644 --- a/src/wp-admin/includes/schema.php +++ b/src/wp-admin/includes/schema.php @@ -230,7 +230,7 @@ CREATE TABLE $wpdb->posts ( registered datetime NOT NULL default '0000-00-00 00:00:00', last_updated datetime NOT NULL default '0000-00-00 00:00:00', public tinyint(2) NOT NULL default '1', - archived enum('0','1') NOT NULL default '0', + archived tinyint(2) NOT NULL default '0', mature tinyint(2) NOT NULL default '0', spam tinyint(2) NOT NULL default '0', deleted tinyint(2) NOT NULL default '0', diff --git a/src/wp-admin/includes/upgrade.php b/src/wp-admin/includes/upgrade.php index 63a6559561..cfbaac8d84 100644 --- a/src/wp-admin/includes/upgrade.php +++ b/src/wp-admin/includes/upgrade.php @@ -1978,10 +1978,21 @@ function pre_schema_upgrade() { $wpdb->query("ALTER TABLE $wpdb->options DROP INDEX option_name"); } - // Upgrade verions prior to 3.7 - if ( $wp_current_db_version < 25179 && is_multisite() && is_main_network() && ! defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) ) { - $wpdb->query( "ALTER TABLE $wpdb->signups ADD signup_id BIGINT(20) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST" ); - $wpdb->query( "ALTER TABLE $wpdb->signups DROP INDEX domain" ); + // Multisite schema upgrades. + if ( $wp_current_db_version < 25448 && is_multisite() && ! defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) && is_main_network() ) { + + // Upgrade verions prior to 3.7 + if ( $wp_current_db_version < 25179 ) { + // New primary key for signups. + $wpdb->query( "ALTER TABLE $wpdb->signups ADD signup_id BIGINT(20) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST" ); + $wpdb->query( "ALTER TABLE $wpdb->signups DROP INDEX domain" ); + } + + if ( $wp_current_db_version < 25448 ) { + // Convert archived from enum to tinyint. + $wpdb->query( "ALTER TABLE $wpdb->blogs CHANGE COLUMN archived archived varchar(1) NOT NULL default '0'" ); + $wpdb->query( "ALTER TABLE $wpdb->blogs CHANGE COLUMN archived archived tinyint(2) NOT NULL default 0" ); + } } } diff --git a/src/wp-includes/version.php b/src/wp-includes/version.php index f8a97f84fd..216e620431 100644 --- a/src/wp-includes/version.php +++ b/src/wp-includes/version.php @@ -11,7 +11,7 @@ $wp_version = '3.7-alpha-25343'; * * @global int $wp_db_version */ -$wp_db_version = 25416; +$wp_db_version = 25448; /** * Holds the TinyMCE version