diff options
Diffstat (limited to 'install')
-rw-r--r-- | install/database.sql | 6 | ||||
-rw-r--r-- | install/update.php | 15 |
2 files changed, 17 insertions, 4 deletions
diff --git a/install/database.sql b/install/database.sql index 915cecdba..f73460937 100644 --- a/install/database.sql +++ b/install/database.sql @@ -240,7 +240,7 @@ CREATE TABLE IF NOT EXISTS `event` ( `start` datetime NOT NULL, `finish` datetime NOT NULL, `summary` text NOT NULL, - `desc` text NOT NULL, + `description` text NOT NULL, `location` text NOT NULL, `type` char(255) NOT NULL, `nofinish` tinyint(1) NOT NULL DEFAULT '0', @@ -319,7 +319,7 @@ CREATE TABLE IF NOT EXISTS `fsuggest` ( PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -CREATE TABLE IF NOT EXISTS `group` ( +CREATE TABLE IF NOT EXISTS `groups` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `hash` char(255) NOT NULL DEFAULT '', `uid` int(10) unsigned NOT NULL, @@ -639,7 +639,7 @@ CREATE TABLE IF NOT EXISTS `photo` ( `created` datetime NOT NULL, `edited` datetime NOT NULL, `title` char(255) NOT NULL, - `desc` text NOT NULL, + `description` text NOT NULL, `album` char(255) NOT NULL, `filename` char(255) NOT NULL, `type` char(128) NOT NULL DEFAULT 'image/jpeg', diff --git a/install/update.php b/install/update.php index 05bddba42..817e4b6bc 100644 --- a/install/update.php +++ b/install/update.php @@ -1,6 +1,6 @@ <?php -define( 'UPDATE_VERSION' , 1085 ); +define( 'UPDATE_VERSION' , 1086 ); /** * @@ -935,3 +935,16 @@ function update_r1084() { return UPDATE_FAILED; } + +function update_r1085() { + $r1 = q("ALTER TABLE `photo` CHANGE `desc` `description` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL "); + + $r2 = q("RENAME TABLE `group` TO `groups`"); + + $r3 = q("ALTER TABLE `event` CHANGE `desc` `description` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL "); + + if($r1 && $r2 && $r3) + return UPDATE_SUCCESS; + return UPDATE_FAILED; + +} |