From bb67062cd5bf9bf58e72f93799452a1a8a3fbe14 Mon Sep 17 00:00:00 2001 From: Savetheinternet Date: Sat, 28 May 2011 01:35:59 +1000 Subject: [PATCH] theme_settings structure change --- install.php | 2 ++ install.sql | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/install.php b/install.php index af425801..a7bf8e96 100644 --- a/install.php +++ b/install.php @@ -64,6 +64,7 @@ // Add `custom_fields` field query(sprintf("ALTER TABLE `posts_%s` ADD `embed` TEXT NULL", $_board['uri'])) or error(db_error()); } + case 'v0.9.2-dev-3': // v0.9.2-dev-3 == v0.9.2 case 'v0.9.2': // Upgrade to v0.9.3-dev-1 @@ -71,6 +72,7 @@ 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()); + query("ALTER TABLE `theme_settings` DROP INDEX `name`") or error(db_error()); // Update version number file_write($config['has_installed'], VERSION); diff --git a/install.sql b/install.sql index 21bc50aa..75760f78 100644 --- a/install.sql +++ b/install.sql @@ -258,8 +258,7 @@ CREATE TABLE IF NOT EXISTS `robot` ( CREATE TABLE IF NOT EXISTS `theme_settings` ( `theme` varchar(40) NOT NULL, `name` varchar(40) DEFAULT NULL, - `value` text, - UNIQUE KEY `name` (`name`) + `value` text ) ENGINE=InnoDB DEFAULT CHARSET=utf8; --