From c39ae3e5e2cd990873cbcaa006cbc3f9badf3fb2 Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Sun, 1 Nov 2015 23:10:25 +0000 Subject: [PATCH] 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 --- wp-admin/includes/upgrade.php | 4 ++++ wp-includes/version.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/upgrade.php b/wp-admin/includes/upgrade.php index d7ac3ebf7d..be948639fc 100644 --- a/wp-admin/includes/upgrade.php +++ b/wp-admin/includes/upgrade.php @@ -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; diff --git a/wp-includes/version.php b/wp-includes/version.php index dcefd6afae..4254a54f32 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.