Make WordPress Core

Ticket #15004: 15004.8.diff

File 15004.8.diff, 1.5 KB (added by josephscott, 11 years ago)

Move to pre_schema_upgrade

  • wp-admin/includes/upgrade.php

     
    19781978                $wpdb->query("ALTER TABLE $wpdb->options DROP INDEX option_name");
    19791979        }
    19801980
     1981        // Upgrade verions prior to 3.7
     1982        if ( $wp_current_db_version < 37000 && ! defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) && is_main_network() ) {
     1983                maybe_add_column(
     1984                        $wpdb->signups,
     1985                        'signup_id',
     1986                        "ALTER TABLE $wpdb->signups ADD signup_id BIGINT(20) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST"
     1987                );
     1988                $wpdb->query( "ALTER TABLE $wpdb->signups DROP INDEX domain" );
     1989        }
    19811990}
    19821991
    19831992/**
  • wp-admin/includes/schema.php

     
    272272  KEY site_id (site_id)
    273273) $charset_collate;
    274274CREATE TABLE $wpdb->signups (
     275  signup_id bigint(20) NOT NULL auto_increment,
    275276  domain varchar(200) NOT NULL default '',
    276277  path varchar(100) NOT NULL default '',
    277278  title longtext NOT NULL,
     
    282283  active tinyint(1) NOT NULL default '0',
    283284  activation_key varchar(50) NOT NULL default '',
    284285  meta longtext,
     286  PRIMARY KEY  (signup_id),
    285287  KEY activation_key (activation_key),
    286   KEY domain (domain)
     288  KEY user_email (user_email)
     289  KEY user_login_email (user_login,user_email),
     290  KEY domain_path (domain,path),
    287291) $charset_collate;";
    288292
    289293        switch ( $scope ) {