bumped version to v0.9.2-dev-2
This commit is contained in:
parent
d8474a4888
commit
eeb4706c76
24
install.php
24
install.php
@ -1,8 +1,6 @@
|
||||
<?php
|
||||
// Installation/upgrade file
|
||||
// Current version: 0.9.2 (or 0.9.1-dev)
|
||||
|
||||
define('VERSION', 'v0.9.2.1-dev');
|
||||
// Installation/upgrade file
|
||||
define('VERSION', 'v0.9.2-dev-2');
|
||||
|
||||
require 'inc/functions.php';
|
||||
require 'inc/display.php';
|
||||
@ -42,13 +40,27 @@
|
||||
query(sprintf("ALTER TABLE `posts_%s` CHANGE `trip` `trip` VARCHAR( 15 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL", $board['uri'])) or error(db_error());
|
||||
}
|
||||
case 'v0.9.2-dev':
|
||||
// Upgrade to v0.9.2.1-dev
|
||||
// Upgrade to v0.9.2-dev-1
|
||||
|
||||
// New table: `theme_settings`
|
||||
query(sprintf("CREATE TABLE IF NOT EXISTS `theme_settings` ( `name` varchar(40) NOT NULL, `value` text, UNIQUE KEY `name` (`name`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;", $board['uri'])) or error(db_error());
|
||||
|
||||
// New table: `news`
|
||||
query(sprintf("CREATE TABLE IF NOT EXISTS `news` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` text NOT NULL, `time` int(11) NOT NULL, `subject` text NOT NULL, `body` text NOT NULL, UNIQUE KEY `id` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;", $board['uri'])) or error(db_error());
|
||||
case 'v0.9.2.1-dev':
|
||||
case 'v0.9.2-dev-1':
|
||||
// Fix broken version number/mistake
|
||||
$version = 'v0.9.2-dev-1';
|
||||
// Upgrade to v0.9.2-dev-2
|
||||
|
||||
$boards = listBoards();
|
||||
foreach($boards as &$_board) {
|
||||
openBoard($_board['uri']);
|
||||
|
||||
// Increase field sizes
|
||||
query(sprintf("ALTER TABLE `posts_%s` CHANGE `subject` `subject` VARCHAR( 50 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL", $board['uri'])) or error(db_error());
|
||||
query(sprintf("ALTER TABLE `posts_%s` CHANGE `name` `name` VARCHAR( 35 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL", $board['uri'])) or error(db_error());
|
||||
}
|
||||
|
||||
$page['title'] = 'Upgraded';
|
||||
$page['body'] = '<p style="text-align:center">Successfully upgraded from ' . $version . ' to <strong>' . VERSION . '</strong>.</p>';
|
||||
@ -62,6 +74,8 @@
|
||||
break;
|
||||
}
|
||||
file_put_contents($config['has_installed'], VERSION);
|
||||
|
||||
sql_close();
|
||||
|
||||
|
||||
die(Element('page.html', $page));
|
||||
|
Loading…
Reference in New Issue
Block a user