mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-05-25 21:54:28 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user