1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-23 23:20:57 +01:00

change theme_settings table strucutre; bump version to v0.9.3-dev-1

This commit is contained in:
Savetheinternet 2011-05-28 00:04:18 +10:00
parent 6f07b9355a
commit 830d4ae45c
2 changed files with 10 additions and 2 deletions

View File

@ -1,6 +1,6 @@
<?php
// Installation/upgrade file
define('VERSION', 'v0.9.2');
define('VERSION', 'v0.9.3-dev-1');
require 'inc/functions.php';
require 'inc/display.php';
@ -64,6 +64,13 @@
// Add `custom_fields` field
query(sprintf("ALTER TABLE `posts_%s` ADD `embed` TEXT NULL", $_board['uri'])) or error(db_error());
}
case 'v0.9.2':
// Upgrade to v0.9.3-dev-1
// Upgrade `theme_settings` table
query("TRUNCATE TABLE `theme_settings`") or error(db_error());
query("ALTER TABLE `theme_settings` ADD `theme` VARCHAR( 40 ) NOT NULL FIRST") or error(db_error());
query("ALTER TABLE `theme_settings` CHANGE `name` `name` VARCHAR( 40 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL") or error(db_error());
// Update version number
file_write($config['has_installed'], VERSION);

View File

@ -256,7 +256,8 @@ CREATE TABLE IF NOT EXISTS `robot` (
--
CREATE TABLE IF NOT EXISTS `theme_settings` (
`name` varchar(40) NOT NULL,
`theme` varchar(40) NOT NULL,
`name` varchar(40) DEFAULT NULL,
`value` text,
UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;