Upgrades: Add support for FULLTEXT indexes to dbDelta().

Props edirect24, mdawaffe, pento.

Fixes #14445.


Built from https://develop.svn.wordpress.org/trunk@35487


git-svn-id: http://core.svn.wordpress.org/trunk@35451 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Gary Pendergast 2015-11-01 23:10:25 +00:00
parent 2e98e461a2
commit c39ae3e5e2
2 changed files with 5 additions and 1 deletions

View File

@ -2195,6 +2195,7 @@ function dbDelta( $queries = '', $execute = true ) {
$keyname = $tableindex->Key_name;
$index_ary[$keyname]['columns'][] = array('fieldname' => $tableindex->Column_name, 'subpart' => $tableindex->Sub_part);
$index_ary[$keyname]['unique'] = ($tableindex->Non_unique == 0)?true:false;
$index_ary[$keyname]['index_type'] = $tableindex->Index_type;
}
// For each actual index in the index array.
@ -2207,6 +2208,9 @@ function dbDelta( $queries = '', $execute = true ) {
} elseif ( $index_data['unique'] ) {
$index_string .= 'UNIQUE ';
}
if ( 'FULLTEXT' === strtoupper( $index_data['index_type'] ) ) {
$index_string .= 'FULLTEXT ';
}
$index_string .= 'KEY ';
if ($index_name != 'PRIMARY') {
$index_string .= $index_name;

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.4-beta2-35486';
$wp_version = '4.4-beta2-35487';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.