From 12c7e7b88c581c3cf8e07a85d587a6add927d750 Mon Sep 17 00:00:00 2001
From: thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>
Date: Fri, 25 Aug 2006 11:51:11 +0000
Subject: Finalized new message parsing. Attention: changes in database schema

git-svn-id: https://svn.roundcube.net/trunk@325 208e9e7b-5314-0410-a742-e7e81cd9613c
---
 roundcubemail/SQL/mysql.update.sql | 60 ++++----------------------------------
 1 file changed, 6 insertions(+), 54 deletions(-)

(limited to 'roundcubemail/SQL/mysql.update.sql')

diff --git a/roundcubemail/SQL/mysql.update.sql b/roundcubemail/SQL/mysql.update.sql
index 7fa296b0b..cfd5af361 100644
--- a/roundcubemail/SQL/mysql.update.sql
+++ b/roundcubemail/SQL/mysql.update.sql
@@ -1,57 +1,9 @@
 -- RoundCube Webmail update script for MySQL databases
--- Updates from version 0.1-20051007
+-- Updates from version 0.1-beta and 0.1-beta2
 
+ALTER TABLE `messages`
+  DROP `body`,
+  DROP INDEX `cache_key`,
+  ADD `structure` TEXT,
+  ADD UNIQUE `uniqueness` (`cache_key`, `uid`);
 
-ALTER TABLE `session` ADD `ip` VARCHAR(15) NOT NULL AFTER changed;
-ALTER TABLE `users` ADD `alias` VARCHAR(128) NOT NULL AFTER mail_host;
-
-
-
--- RoundCube Webmail update script for MySQL databases
--- Updates from version 0.1-20051021
-
-ALTER TABLE `session` CHANGE `sess_id` `sess_id` VARCHAR(40) NOT NULL;
-
-ALTER TABLE `contacts` CHANGE `del` `del` TINYINT(1) NOT NULL;
-ALTER TABLE `contacts` ADD `changed` DATETIME NOT NULL AFTER `user_id`;
-
-UPDATE `contacts`  SET `del`=0 WHERE `del`=1;
-UPDATE `contacts`  SET `del`=1 WHERE `del`=2;
-
-ALTER TABLE `identities` CHANGE `default` `standard` TINYINT(1) NOT NULL;
-ALTER TABLE `identities` CHANGE `del` `del` TINYINT(1) NOT NULL;
-
-UPDATE `identities`  SET `del`=0 WHERE `del`=1;
-UPDATE `identities`  SET `del`=1 WHERE `del`=2;
-UPDATE `identities`  SET `standard`=0 WHERE `standard`=1;
-UPDATE `identities`  SET `standard`=1 WHERE `standard`=2;
-
-CREATE TABLE `messages` (
-  `message_id` int(11) unsigned NOT NULL auto_increment,
-  `user_id` int(11) unsigned NOT NULL default '0',
-  `del` tinyint(1) NOT NULL default '0',
-  `cache_key` varchar(128) NOT NULL default '',
-  `created` datetime NOT NULL default '0000-00-00 00:00:00',
-  `idx` int(11) unsigned NOT NULL default '0',
-  `uid` int(11) unsigned NOT NULL default '0',
-  `subject` varchar(255) NOT NULL default '',
-  `from` varchar(255) NOT NULL default '',
-  `to` varchar(255) NOT NULL default '',
-  `cc` varchar(255) NOT NULL default '',
-  `date` datetime NOT NULL default '0000-00-00 00:00:00',
-  `size` int(11) unsigned NOT NULL default '0',
-  `headers` text NOT NULL,
-  `body` longtext,
-  PRIMARY KEY  (`message_id`),
-  KEY `user_id` (`user_id`),
-  KEY `cache_key` (`cache_key`),
-  KEY `idx` (`idx`),
-  KEY `uid` (`uid`)
-) TYPE=MyISAM;
-
-
-
--- RoundCube Webmail update script for MySQL databases
--- Updates from version 0.1-20051216
-
-ALTER TABLE `messages` ADD `created` DATETIME NOT NULL AFTER `cache_key` ;
-- 
cgit v1.2.3

