From 692ef9c3309bde60346beb32386ff17157e0a5e2 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Mon, 1 Nov 2010 13:27:44 -0700 Subject: Include fulltext indexes in MySQL table create --- lib/mysqlschema.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'lib/mysqlschema.php') diff --git a/lib/mysqlschema.php b/lib/mysqlschema.php index a2581e6d8..c3d3501c7 100644 --- a/lib/mysqlschema.php +++ b/lib/mysqlschema.php @@ -244,6 +244,20 @@ class MysqlSchema extends Schema return $this->fetchQueryData($sql); } + /** + * 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. * -- cgit v1.2.3-54-g00ecf