diff options
| author | Savetheinternet <savetheinternet@tinyboard.org> | 2011-10-09 04:04:39 +1100 |
|---|---|---|
| committer | Savetheinternet <savetheinternet@tinyboard.org> | 2011-10-09 04:04:39 +1100 |
| commit | bcc42daf9b737016b1f2792d43b0a97e83ed18d9 (patch) | |
| tree | 88a4551255ed5747af3634c22e744b7e9b44cd87 | |
| parent | 091a62061c962c0843b7d3d0dfe5c7293eb34d83 (diff) | |
fix table indexes
| -rw-r--r-- | install.php | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/install.php b/install.php index 0d1310b1..c3ec31d2 100644 --- a/install.php +++ b/install.php @@ -1,6 +1,6 @@ <?php // Installation/upgrade file - define('VERSION', 'v0.9.3'); + define('VERSION', 'v0.9.4-dev-1'); require 'inc/functions.php'; require 'inc/display.php'; @@ -112,14 +112,30 @@ case 'v0.9.3-dev-8': $boards = listBoards(); foreach($boards as &$board) { - query(sprintf("ALTER TABLE `posts_%s` ADD INDEX ( `thread` )", $board['uri'])) or error(db_error()); + query(sprintf("ALTER TABLE `posts_%s` ADD INDEX ( `thread` )", $board['uri'])) or error(db_error()); } case 'v0.9.3-dev-9': $boards = listBoards(); foreach($boards as &$board) { - query(sprintf("ALTER TABLE `posts_%s`ADD INDEX ( `time` )", $board['uri'])) or error(db_error()); - query(sprintf("ALTER TABLE `posts_%s`ADD FULLTEXT (`body`)", $board['uri'])) or error(db_error()); + query(sprintf("ALTER TABLE `posts_%s`ADD INDEX ( `time` )", $board['uri'])) or error(db_error()); + query(sprintf("ALTER TABLE `posts_%s`ADD FULLTEXT (`body`)", $board['uri'])) or error(db_error()); } + case 'v0.9.3-dev-10': + case 'v0.9.3': + query("ALTER TABLE `bans` DROP INDEX `id`") or error(db_error()); + query("ALTER TABLE `pms` DROP INDEX `id`") or error(db_error()); + query("ALTER TABLE `boards` DROP PRIMARY KEY") or error(db_error()); + query("ALTER TABLE `reports` DROP INDEX `id`") or error(db_error()); + query("ALTER TABLE `boards` DROP INDEX `uri`") or error(db_error()); + + query("ALTER TABLE `bans` ADD FULLTEXT (`ip`)") or error(db_error()); + query("ALTER TABLE `ip_notes` ADD INDEX (`ip`)") or error(db_error()); + query("ALTER TABLE `modlogs` ADD INDEX (`time`)") or error(db_error()); + query("ALTER TABLE `robot` ADD PRIMARY KEY (`hash`)") or error(db_error()); + query("ALTER TABLE `boards` ADD PRIMARY KEY(`uri`)") or error(db_error()); + query("ALTER TABLE `mutes` ADD INDEX (`ip`)") or error(db_error()); + query("ALTER TABLE `news` ADD INDEX (`time`)") or error(db_error()); + query("ALTER TABLE `theme_settings` ADD INDEX (`theme`)") or error(db_error()); case false: // Update version number file_write($config['has_installed'], VERSION); |
