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

Props edirect24, mdawaffe, pento.

Fixes #14445.



git-svn-id: https://develop.svn.wordpress.org/trunk@35487 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Gary Pendergast
2015-11-01 23:09:49 +00:00
parent 3ef1e8194b
commit c9f7e05f7b
2 changed files with 32 additions and 3 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;