Drop the comment_approved index from the comments table. comment_approved_date_gmt is sufficient. fixes #19935
git-svn-id: http://svn.automattic.com/wordpress/trunk@19799 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0f80145c67
commit
5fd633b48b
|
@ -103,7 +103,6 @@ CREATE TABLE $wpdb->comments (
|
|||
comment_parent bigint(20) unsigned NOT NULL default '0',
|
||||
user_id bigint(20) unsigned NOT NULL default '0',
|
||||
PRIMARY KEY (comment_ID),
|
||||
KEY comment_approved (comment_approved),
|
||||
KEY comment_post_ID (comment_post_ID),
|
||||
KEY comment_approved_date_gmt (comment_approved,comment_date_gmt),
|
||||
KEY comment_date_gmt (comment_date_gmt),
|
||||
|
|
|
@ -459,7 +459,7 @@ function upgrade_all() {
|
|||
if ( $wp_current_db_version < 19389 )
|
||||
upgrade_330();
|
||||
|
||||
if ( $wp_current_db_version < 19793 )
|
||||
if ( $wp_current_db_version < 19799 )
|
||||
upgrade_340();
|
||||
|
||||
maybe_disable_automattic_widgets();
|
||||
|
@ -1224,11 +1224,19 @@ function upgrade_330() {
|
|||
function upgrade_340() {
|
||||
global $wp_current_db_version, $wpdb;
|
||||
|
||||
$wpdb->hide_errors();
|
||||
$wpdb->query( "ALTER TABLE $wpdb->options DROP COLUMN blog_id" );
|
||||
$wpdb->show_errors();
|
||||
}
|
||||
|
||||
if ( $wp_current_db_version < 19798 ) {
|
||||
$wpdb->hide_errors();
|
||||
$wpdb->query( "ALTER TABLE $wpdb->options DROP COLUMN blog_id" );
|
||||
$wpdb->show_errors();
|
||||
}
|
||||
|
||||
if ( $wp_current_db_version < 19799 ) {
|
||||
$wpdb->hide_errors();
|
||||
$wpdb->query("ALTER TABLE $wpdb->comments DROP INDEX comment_approved");
|
||||
$wpdb->show_errors();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute network level changes
|
||||
*
|
||||
|
|
|
@ -11,7 +11,7 @@ $wp_version = '3.4-alpha-19719';
|
|||
*
|
||||
* @global int $wp_db_version
|
||||
*/
|
||||
$wp_db_version = 19798;
|
||||
$wp_db_version = 19799;
|
||||
|
||||
/**
|
||||
* Holds the TinyMCE version
|
||||
|
|
Loading…
Reference in New Issue