WordPress.org

Make WordPress Core

Changeset 25448


Ignore:
Timestamp:
09/15/2013 11:11:30 PM (7 years ago)
Author:
nacin
Message:

Multisite blogs table: Convert the archived field from enum to tinyint to match the other status fields. fixes #12832.

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/schema.php

    r25416 r25448  
    231231  last_updated datetime NOT NULL default '0000-00-00 00:00:00',
    232232  public tinyint(2) NOT NULL default '1',
    233   archived enum('0','1') NOT NULL default '0',
     233  archived tinyint(2) NOT NULL default '0',
    234234  mature tinyint(2) NOT NULL default '0',
    235235  spam tinyint(2) NOT NULL default '0',
  • trunk/src/wp-admin/includes/upgrade.php

    r25179 r25448  
    19791979    }
    19801980
    1981     // Upgrade verions prior to 3.7
    1982     if ( $wp_current_db_version < 25179 && is_multisite() && is_main_network() && ! defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) ) {
    1983         $wpdb->query( "ALTER TABLE $wpdb->signups ADD signup_id BIGINT(20) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST" );
    1984         $wpdb->query( "ALTER TABLE $wpdb->signups DROP INDEX domain" );
     1981    // Multisite schema upgrades.
     1982    if ( $wp_current_db_version < 25448 && is_multisite() && ! defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) && is_main_network() ) {
     1983
     1984        // Upgrade verions prior to 3.7
     1985        if ( $wp_current_db_version < 25179 ) {
     1986            // New primary key for signups.
     1987            $wpdb->query( "ALTER TABLE $wpdb->signups ADD signup_id BIGINT(20) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST" );
     1988            $wpdb->query( "ALTER TABLE $wpdb->signups DROP INDEX domain" );
     1989        }
     1990
     1991        if ( $wp_current_db_version < 25448 ) {
     1992            // Convert archived from enum to tinyint.
     1993            $wpdb->query( "ALTER TABLE $wpdb->blogs CHANGE COLUMN archived archived varchar(1) NOT NULL default '0'" );
     1994            $wpdb->query( "ALTER TABLE $wpdb->blogs CHANGE COLUMN archived archived tinyint(2) NOT NULL default 0" );
     1995        }
    19851996    }
    19861997}
  • trunk/src/wp-includes/version.php

    r25416 r25448  
    1212 * @global int $wp_db_version
    1313 */
    14 $wp_db_version = 25416;
     14$wp_db_version = 25448;
    1515
    1616/**
Note: See TracChangeset for help on using the changeset viewer.