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. Built from https://develop.svn.wordpress.org/trunk@30134 git-svn-id: http://core.svn.wordpress.org/trunk@30134 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8d0e8942eb
commit
e9f6ee53bb
|
@ -442,9 +442,6 @@ function upgrade_all() {
|
||||||
if ( $wp_current_db_version < 29630 )
|
if ( $wp_current_db_version < 29630 )
|
||||||
upgrade_400();
|
upgrade_400();
|
||||||
|
|
||||||
if ( $wp_current_db_version < 30056 )
|
|
||||||
upgrade_410();
|
|
||||||
|
|
||||||
maybe_disable_link_manager();
|
maybe_disable_link_manager();
|
||||||
|
|
||||||
maybe_disable_automattic_widgets();
|
maybe_disable_automattic_widgets();
|
||||||
|
@ -1331,18 +1328,6 @@ function upgrade_400() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Execute changes made in WordPress 4.1.0.
|
|
||||||
*
|
|
||||||
* @since 4.1.0
|
|
||||||
*/
|
|
||||||
function upgrade_410() {
|
|
||||||
global $wp_current_db_version, $wpdb;
|
|
||||||
if ( $wp_current_db_version < 30056 ) {
|
|
||||||
add_clean_index( $wpdb->terms, 'slug' );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Execute network level changes
|
* Execute network level changes
|
||||||
*
|
*
|
||||||
|
@ -2205,6 +2190,11 @@ function pre_schema_upgrade() {
|
||||||
$wpdb->query( "ALTER TABLE $wpdb->blogs CHANGE COLUMN archived archived tinyint(2) NOT NULL default 0" );
|
$wpdb->query( "ALTER TABLE $wpdb->blogs CHANGE COLUMN archived archived tinyint(2) NOT NULL default 0" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( $wp_current_db_version < 30133 ) {
|
||||||
|
// dbDelta() can recreate but can't drop the index.
|
||||||
|
$wpdb->query( "ALTER TABLE $wpdb->terms DROP INDEX slug" );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -4,14 +4,14 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.1-alpha-30133';
|
$wp_version = '4.1-alpha-30134';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
*
|
*
|
||||||
* @global int $wp_db_version
|
* @global int $wp_db_version
|
||||||
*/
|
*/
|
||||||
$wp_db_version = 30056;
|
$wp_db_version = 30133;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the TinyMCE version
|
* Holds the TinyMCE version
|
||||||
|
|
Loading…
Reference in New Issue