Finish upgrade to new bans table

This commit is contained in:
Michael Foster 2013-09-17 09:23:50 +10:00
parent f53348d7c8
commit c7c297b8a6
2 changed files with 16 additions and 9 deletions

View file

@ -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);