summaryrefslogtreecommitdiff
path: root/install.php
diff options
context:
space:
mode:
authorMichael Foster <savetheinternet@tinyboard.org>2013-09-17 09:23:50 +1000
committerMichael Foster <savetheinternet@tinyboard.org>2013-09-17 09:23:50 +1000
commitc7c297b8a6f526a467f0f3bd8044e02d481db63a (patch)
treef7f1fdc991676f6ce4a6dfaad571c008782dda18 /install.php
parentf53348d7c8b4f9bc5bb29850faec80c91954e7f1 (diff)
Finish upgrade to new bans table
Diffstat (limited to 'install.php')
-rw-r--r--install.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/install.php b/install.php
index 69be6300..c39f62dd 100644
--- a/install.php
+++ b/install.php
@@ -467,6 +467,11 @@ if (file_exists($config['has_installed'])) {
$query->bindValue(':seen', $ban['seen']);
$query->execute() or error(db_error($query));
}
+
+ // Drop old bans table
+ query("DROP TABLE ``bans``") or error(db_error());
+ // Replace with new table
+ query("RENAME TABLE ``bans_new_temp`` TO ``bans``") or error(db_error());
case false:
// Update version number
file_write($config['has_installed'], VERSION);