Conflicts:
	install.php
This commit is contained in:
czaks
2013-09-01 11:25:19 -04:00
13 changed files with 173 additions and 82 deletions

View File

@@ -1,7 +1,7 @@
<?php
// Installation/upgrade file
define('VERSION', 'v0.9.6-dev-14 + <a href="https://int.vichan.net/devel/">vichan-devel-4.0.12</a>');
define('VERSION', 'v0.9.6-dev-16 + <a href="https://int.vichan.net/devel/">vichan-devel-4.0.13</a>');
require 'inc/functions.php';
@@ -384,6 +384,23 @@ if (file_exists($config['has_installed'])) {
case 'v0.9.6-dev-13':
query("ALTER TABLE ``antispam`` ADD INDEX `expires` (`expires`)") or error(db_error());
case 'v0.9.6-dev-14':
case 'v0.9.6-dev-14 + <a href="https://int.vichan.net/devel/">vichan-devel-4.0.12</a>':
foreach ($boards as &$board) {
query(sprintf("ALTER TABLE ``posts_%s``
DROP INDEX `body`,
ADD INDEX `filehash` (`filehash`(40))", $board['uri'])) or error(db_error());
}
query("ALTER TABLE ``modlogs`` ADD INDEX `mod` (`mod`)") or error(db_error());
query("ALTER TABLE ``bans`` DROP INDEX `ip`") or error(db_error());
query("ALTER TABLE ``bans`` ADD INDEX `ip` (`ip`)") or error(db_error());
query("ALTER TABLE ``noticeboard`` ADD INDEX `time` (`time`)") or error(db_error());
query("ALTER TABLE ``pms`` ADD INDEX `to` (`to`, `unread`)") or error(db_error());
case 'v0.9.6-dev-15':
foreach ($boards as &$board) {
query(sprintf("ALTER TABLE ``posts_%s``
ADD INDEX `list_threads` (`thread`, `sticky`, `bump`)", $board['uri'])) or error(db_error());
}
case 'v0.9.6-dev-16':
case false:
// Update version number
file_write($config['has_installed'], VERSION);