Make WordPress Core

Changeset 30134


Ignore:
Timestamp:
11/01/2014 01:10:04 AM (10 years ago)
Author:
boonebgorges
Message:

Fix database schema update introduced in [30121].

The index must be manually dropped before dbDelta() can add the new index
without throwing a notice.

Fixes #22023.

Location:
trunk/src
Files:
2 edited

Legend:

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

    r30121 r30134  
    442442    if ( $wp_current_db_version < 29630 )
    443443        upgrade_400();
    444 
    445     if ( $wp_current_db_version < 30056 )
    446         upgrade_410();
    447444
    448445    maybe_disable_link_manager();
     
    13331330
    13341331/**
    1335  * Execute changes made in WordPress 4.1.0.
    1336  *
    1337  * @since 4.1.0
    1338  */
    1339 function upgrade_410() {
    1340     global $wp_current_db_version, $wpdb;
    1341     if ( $wp_current_db_version < 30056 ) {
    1342         add_clean_index( $wpdb->terms, 'slug' );
    1343     }
    1344 }
    1345 
    1346 /**
    13471332 * Execute network level changes
    13481333 *
     
    22062191        }
    22072192    }
     2193
     2194    if ( $wp_current_db_version < 30133 ) {
     2195        // dbDelta() can recreate but can't drop the index.
     2196        $wpdb->query( "ALTER TABLE $wpdb->terms DROP INDEX slug" );
     2197    }
    22082198}
    22092199
  • trunk/src/wp-includes/version.php

    r30121 r30134  
    1212 * @global int $wp_db_version
    1313 */
    14 $wp_db_version = 30056;
     14$wp_db_version = 30133;
    1515
    1616/**
Note: See TracChangeset for help on using the changeset viewer.