Database: Add support for `SPATIAL` keys to `dbDelta()`.
`dbDelta()` already supported spatial fields (by virtue of not checking field types), so it's nice to round that out with spatial key support, too. Fixes #36948. Built from https://develop.svn.wordpress.org/trunk@37574 git-svn-id: http://core.svn.wordpress.org/trunk@37542 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
253686fae6
commit
0db17129a5
|
@ -2200,6 +2200,7 @@ function dbDelta( $queries = '', $execute = true ) {
|
|||
case 'fulltext':
|
||||
case 'unique':
|
||||
case 'key':
|
||||
case 'spatial':
|
||||
$validfield = false;
|
||||
$indices[] = trim(trim($fld), ", \n");
|
||||
break;
|
||||
|
@ -2301,6 +2302,9 @@ function dbDelta( $queries = '', $execute = true ) {
|
|||
if ( 'FULLTEXT' === strtoupper( $index_data['index_type'] ) ) {
|
||||
$index_string .= 'FULLTEXT ';
|
||||
}
|
||||
if ( 'SPATIAL' === strtoupper( $index_data['index_type'] ) ) {
|
||||
$index_string .= 'SPATIAL ';
|
||||
}
|
||||
$index_string .= 'KEY ';
|
||||
if ($index_name != 'PRIMARY') {
|
||||
$index_string .= $index_name;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.6-alpha-37573';
|
||||
$wp_version = '4.6-alpha-37574';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue