summaryrefslogtreecommitdiff
path: root/install.php
diff options
context:
space:
mode:
authorMichael Foster <savetheinternet@tinyboard.org>2013-09-01 02:04:42 +1000
committerMichael Foster <savetheinternet@tinyboard.org>2013-09-01 02:04:42 +1000
commitb51fc38783c1b93f1667ea4fb41a077de66dad49 (patch)
treed6c8db4f1306c97189b8eff724b1bb307245db2f /install.php
parentc567131ca703a8bda0c3b1ca83fa2cae5af863a4 (diff)
Some SQL and indexes improvements
Diffstat (limited to 'install.php')
-rw-r--r--install.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/install.php b/install.php
index 35c1ecb7..967af7de 100644
--- a/install.php
+++ b/install.php
@@ -1,7 +1,7 @@
<?php
// Installation/upgrade file
-define('VERSION', 'v0.9.6-dev-14');
+define('VERSION', 'v0.9.6-dev-15');
require 'inc/functions.php';
@@ -370,6 +370,17 @@ 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':
+ 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 false:
// Update version number
file_write($config['has_installed'], VERSION);