1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-12 01:50:48 +01:00

last minute bug-fix with upgrading

This commit is contained in:
Savetheinternet 2011-12-04 15:29:38 +11:00
parent 28270f6f55
commit f5bac44604

View File

@ -119,20 +119,20 @@
}
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` DROP INDEX `id`");
query("ALTER TABLE `pms` DROP INDEX `id`");
query("ALTER TABLE `boards` DROP PRIMARY KEY");
query("ALTER TABLE `reports` DROP INDEX `id`");
query("ALTER TABLE `boards` DROP INDEX `uri`");
query("ALTER IGNORE TABLE `robot` ADD PRIMARY KEY (`hash`)") 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 `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());
query("ALTER IGNORE TABLE `robot` ADD PRIMARY KEY (`hash`)");
query("ALTER TABLE `bans` ADD FULLTEXT (`ip`)");
query("ALTER TABLE `ip_notes` ADD INDEX (`ip`)");
query("ALTER TABLE `modlogs` ADD INDEX (`time`)");
query("ALTER TABLE `boards` ADD PRIMARY KEY(`uri`)");
query("ALTER TABLE `mutes` ADD INDEX (`ip`)");
query("ALTER TABLE `news` ADD INDEX (`time`)");
query("ALTER TABLE `theme_settings` ADD INDEX (`theme`)");
case 'v0.9.4-dev-1':
foreach($boards as &$board) {
query(sprintf("ALTER TABLE `posts_%s` ADD `sage` INT( 1 ) NOT NULL AFTER `locked`", $board['uri'])) or error(db_error());