diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-09-16 22:23:32 -0700 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-09-16 22:23:32 -0700 |
commit | 9d76797b17d65540a903ef37eee6edca3e83108b (patch) | |
tree | 0040acb8746d68e21f06ab265493f4054e525908 /modules/search/helpers | |
parent | 5490057480f17e5810cf8b9e558769ebd74d4b27 (diff) |
Changed the search module installer to explicitly specify MyISAM as the database type. Changed the packager to not remove the engine specification if the table is search_records. Fixes Ticket #774
Diffstat (limited to 'modules/search/helpers')
-rw-r--r-- | modules/search/helpers/search_installer.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/modules/search/helpers/search_installer.php b/modules/search/helpers/search_installer.php index 10d8211f..096f46c7 100644 --- a/modules/search/helpers/search_installer.php +++ b/modules/search/helpers/search_installer.php @@ -28,6 +28,7 @@ class search_installer { PRIMARY KEY (`id`), KEY(`item_id`), FULLTEXT INDEX (`data`)) + ENGINE=MYISAM DEFAULT CHARSET=utf8;"); module::set_version("search", 1); } @@ -47,4 +48,13 @@ class search_installer { static function uninstall() { Database::instance()->query("DROP TABLE {search_records}"); } + + static function upgrade($version) { + $db = Database::instance(); + if ($version == 1) { + $db->query("ALTER TABLE {search_records} ENGINE=MYISAM"); + module::set_version("search", 2); + } + } + } |