Cyclical threads ♺

This commit is contained in:
Fredrick Brennan
2015-04-03 14:56:28 +08:00
committed by czaks
parent ab02a42725
commit 505adffcdc
10 changed files with 70 additions and 7 deletions

View File

@@ -1,7 +1,7 @@
<?php
// Installation/upgrade file
define('VERSION', '5.1.1');
define('VERSION', '5.1.2');
require 'inc/functions.php';
@@ -570,6 +570,11 @@ if (file_exists($config['has_installed'])) {
PRIMARY KEY (`id`),
UNIQUE KEY `u_pages` (`name`,`board`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;') or error(db_error());
case '5.1.1':
foreach ($boards as &$board) {
query(sprintf("ALTER TABLE ``posts_%s`` ADD `cycle` int(1) NOT NULL AFTER `locked`", $board['uri'])) or error(db_error());
}
case false:
// TODO: enhance Tinyboard -> vichan upgrade path.
query("CREATE TABLE IF NOT EXISTS ``search_queries`` ( `ip` varchar(39) NOT NULL, `time` int(11) NOT NULL, `query` text NOT NULL) ENGINE=MyISAM DEFAULT CHARSET=utf8;") or error(db_error());