Make WordPress Core


Ignore:
Timestamp:
01/31/2012 06:26:07 PM (14 years ago)
Author:
ryan
Message:

Drop the comment_approved index from the comments table. comment_approved_date_gmt is sufficient. fixes #19935

File:
1 edited

Legend:

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

    r19798 r19799  
    460460        upgrade_330();
    461461
    462     if ( $wp_current_db_version < 19793 )
     462    if ( $wp_current_db_version < 19799 )
    463463        upgrade_340();
    464464
     
    12251225    global $wp_current_db_version, $wpdb;
    12261226
    1227     $wpdb->hide_errors();
    1228     $wpdb->query( "ALTER TABLE $wpdb->options DROP COLUMN blog_id" );
    1229     $wpdb->show_errors();
    1230 }   
    1231    
     1227    if ( $wp_current_db_version < 19798 ) {
     1228        $wpdb->hide_errors();
     1229        $wpdb->query( "ALTER TABLE $wpdb->options DROP COLUMN blog_id" );
     1230        $wpdb->show_errors();
     1231    }
     1232
     1233    if ( $wp_current_db_version < 19799 ) {
     1234        $wpdb->hide_errors();
     1235        $wpdb->query("ALTER TABLE $wpdb->comments DROP INDEX comment_approved");
     1236        $wpdb->show_errors();
     1237    }
     1238}
     1239
    12321240/**
    12331241 * Execute network level changes
Note: See TracChangeset for help on using the changeset viewer.