diff options
| author | Michael Save <savetheinternet@tinyboard.org> | 2013-01-19 18:49:00 +1100 |
|---|---|---|
| committer | Michael Save <savetheinternet@tinyboard.org> | 2013-01-19 18:49:00 +1100 |
| commit | 27ee4d320c196a5490891831f615f2e871eb6782 (patch) | |
| tree | 052c7f64bf1c339b6351e80d7b3c85f8225a9c65 | |
| parent | 7b02357e235aaab0bfa2feb7bad85300885ef258 (diff) | |
Upgrade script for new kew
| -rw-r--r-- | install.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/install.php b/install.php index 7d27940b..1447c723 100644 --- a/install.php +++ b/install.php @@ -1,7 +1,7 @@ <?php // Installation/upgrade file -define('VERSION', 'v0.9.6-dev-6'); +define('VERSION', 'v0.9.6-dev-7'); require 'inc/functions.php'; @@ -222,6 +222,11 @@ if (file_exists($config['has_installed'])) { foreach ($boards as $board) { query(sprintf("ALTER TABLE `posts_%s` CHANGE `id` `id` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT", $board['uri'])) or error(db_error()); } + case 'v0.9.6-dev-6': + foreach ($boards as &$_board) { + query(sprintf("CREATE INDEX `thread_id` ON `posts_%s` (`thread`, `id`)", $_board['uri'])) or error(db_error()); + query(sprintf("ALTER TABLE `posts_%s` DROP INDEX `thread`", $_board['uri'])) or error(db_error()); + } case false: // Update version number file_write($config['has_installed'], VERSION); |
