Add signup_id primary key to $wpdb->signups, and add better indexes.
props josephscott, pento, barry. see #15004. Built from https://develop.svn.wordpress.org/trunk@25179 git-svn-id: http://core.svn.wordpress.org/trunk@25151 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
cbad0048a4
commit
af70c14d6d
|
@ -272,6 +272,7 @@ CREATE TABLE $wpdb->sitemeta (
|
|||
KEY site_id (site_id)
|
||||
) $charset_collate;
|
||||
CREATE TABLE $wpdb->signups (
|
||||
signup_id bigint(20) NOT NULL auto_increment,
|
||||
domain varchar(200) NOT NULL default '',
|
||||
path varchar(100) NOT NULL default '',
|
||||
title longtext NOT NULL,
|
||||
|
@ -282,8 +283,11 @@ CREATE TABLE $wpdb->signups (
|
|||
active tinyint(1) NOT NULL default '0',
|
||||
activation_key varchar(50) NOT NULL default '',
|
||||
meta longtext,
|
||||
PRIMARY KEY (signup_id),
|
||||
KEY activation_key (activation_key),
|
||||
KEY domain (domain)
|
||||
KEY user_email (user_email)
|
||||
KEY user_login_email (user_login,user_email),
|
||||
KEY domain_path (domain,path),
|
||||
) $charset_collate;";
|
||||
|
||||
switch ( $scope ) {
|
||||
|
|
|
@ -1978,6 +1978,11 @@ 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" );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -11,7 +11,7 @@ $wp_version = '3.7-alpha-25157';
|
|||
*
|
||||
* @global int $wp_db_version
|
||||
*/
|
||||
$wp_db_version = 24448;
|
||||
$wp_db_version = 25179;
|
||||
|
||||
/**
|
||||
* Holds the TinyMCE version
|
||||
|
|
Loading…
Reference in New Issue