summaryrefslogtreecommitdiff
path: root/SQL/mysql.update.sql
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2005-12-03 16:54:12 +0000
committerthomascube <thomas@roundcube.net>2005-12-03 16:54:12 +0000
commit1cded85790206afe084e1baff371c543711b2b18 (patch)
treeb050fb89707e048df5f30f500faad792962a1e81 /SQL/mysql.update.sql
parent5bc8cb662fc3bcda9aa641b7a5e88c0b81dd63d6 (diff)
Re-design of caching (new database table added\!); some bugfixes; Postgres support
Diffstat (limited to 'SQL/mysql.update.sql')
-rw-r--r--SQL/mysql.update.sql35
1 files changed, 35 insertions, 0 deletions
diff --git a/SQL/mysql.update.sql b/SQL/mysql.update.sql
index 0119225ef..778919acf 100644
--- a/SQL/mysql.update.sql
+++ b/SQL/mysql.update.sql
@@ -11,4 +11,39 @@ ALTER TABLE users ADD alias VARCHAR(128) NOT NULL AFTER mail_host;
-- 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 '',
+ `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;