Multisite blogs table: Convert the archived field from enum to tinyint to match the other status fields. fixes #12832.
Built from https://develop.svn.wordpress.org/trunk@25448 git-svn-id: http://core.svn.wordpress.org/trunk@25369 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d39f430f64
commit
6931079cec
|
@ -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',
|
||||
|
|
|
@ -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" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue