diff options
author | Brion Vibber <brion@pobox.com> | 2010-11-01 13:27:44 -0700 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-11-01 13:27:44 -0700 |
commit | 692ef9c3309bde60346beb32386ff17157e0a5e2 (patch) | |
tree | d07defd6b9e6e95e5c30eb5c2234dce7f5ed8fb2 /lib/mysqlschema.php | |
parent | 96521f38d2f6db7a85e17f2f7f6e4eabeaa06cf8 (diff) |
Include fulltext indexes in MySQL table create
Diffstat (limited to 'lib/mysqlschema.php')
-rw-r--r-- | lib/mysqlschema.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/mysqlschema.php b/lib/mysqlschema.php index a2581e6d8..c3d3501c7 100644 --- a/lib/mysqlschema.php +++ b/lib/mysqlschema.php @@ -245,6 +245,20 @@ class MysqlSchema extends Schema } /** + * Append an SQL statement with an index definition for a full-text search + * index over one or more columns on a table. + * + * @param array $statements + * @param string $table + * @param string $name + * @param array $def + */ + function appendCreateFulltextIndex(array &$statements, $table, $name, array $def) + { + $statements[] = "CREATE FULLTEXT INDEX $name ON $table " . $this->buildIndexList($def); + } + + /** * Close out a 'create table' SQL statement. * * @param string $name |