WordPress.org

Make WordPress Core

Changeset 25179


Ignore:
Timestamp:
08/30/2013 04:29:06 AM (6 years ago)
Author:
nacin
Message:

Add signup_id primary key to $wpdb->signups, and add better indexes.

props josephscott, pento, barry.
see #15004.

Location:
trunk/src
Files:
3 edited

Legend:

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

    r25171 r25179  
    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 '',
     
    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
  • trunk/src/wp-admin/includes/upgrade.php

    r24625 r25179  
    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" );
     1985    }
    19811986}
    19821987
  • trunk/src/wp-includes/version.php

    r25157 r25179  
    1212 * @global int $wp_db_version
    1313 */
    14 $wp_db_version = 24448;
     14$wp_db_version = 25179;
    1515
    1616/**
Note: See TracChangeset for help on using the changeset viewer.