Make WordPress Core


Ignore:
Timestamp:
05/26/2016 04:58:13 AM (7 years ago)
Author:
pento
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/upgrade.php

    r37538 r37574  
    22012201                case 'unique':
    22022202                case 'key':
     2203                case 'spatial':
    22032204                    $validfield = false;
    22042205                    $indices[] = trim(trim($fld), ", \n");
     
    23012302                if ( 'FULLTEXT' === strtoupper( $index_data['index_type'] ) ) {
    23022303                    $index_string .= 'FULLTEXT ';
     2304                }
     2305                if ( 'SPATIAL' === strtoupper( $index_data['index_type'] ) ) {
     2306                    $index_string .= 'SPATIAL ';
    23032307                }
    23042308                $index_string .= 'KEY ';
Note: See TracChangeset for help on using the changeset viewer.