Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 218 lines (168 sloc) 8.151 kb
e019f2d0 » alecpl
2010-09-25 - s/RoundCube/Roundcube/
1 -- Roundcube Webmail update script for MySQL databases
161bb97f » alecpl
2010-06-15 - Added ALTER TABLE .. ENGINE=InnoDB, per discussion in #1486794
2
3 -- Updates from version 0.1-stable
79fe17fb » thomascube
2005-10-07 Added SQLite supprt and MySQL update script
4
29451cfc » thomascube
2007-09-11 Truncate cache table before adding index
5 TRUNCATE TABLE `messages`;
6
f7bfec96 » thomascube
2006-08-25 Finalized new message parsing. Attention: changes in database schema
7 ALTER TABLE `messages`
ac26b964 » thomascube
2008-03-25 Optimize database schema; get rid of unnecessary indexes
8 DROP INDEX `idx`,
9 DROP INDEX `uid`;
5870871a » thomascube
2007-05-17 Changed sql scripts to allow non-ascii chars in user names (#1483959)
10
ac26b964 » thomascube
2008-03-25 Optimize database schema; get rid of unnecessary indexes
11 ALTER TABLE `cache`
12 DROP INDEX `cache_key`,
13 DROP INDEX `session_id`,
14 ADD INDEX `user_cache_index` (`user_id`,`cache_key`);
6cb77869 » alecpl
2008-04-03 #1484854
15
16 ALTER TABLE `users`
f5e8d23e » alecpl
2008-04-05 #1484962: typo
17 ADD INDEX `username_index` (`username`),
6cb77869 » alecpl
2008-04-03 #1484854
18 ADD INDEX `alias_index` (`alias`);
d7f3d796 » alecpl
2008-05-19 -Fixed Mysql DDL for default identities creation (#1485070)
19
20 -- Updates from version 0.1.1
21
22 ALTER TABLE `identities`
f18911ad » alecpl
2008-06-12 - #1485120 (text column can't have a default value)
23 MODIFY `signature` text,
d7f3d796 » alecpl
2008-05-19 -Fixed Mysql DDL for default identities creation (#1485070)
24 MODIFY `bcc` varchar(128) NOT NULL DEFAULT '',
25 MODIFY `reply-to` varchar(128) NOT NULL DEFAULT '',
26 MODIFY `organization` varchar(128) NOT NULL DEFAULT '',
27 MODIFY `name` varchar(128) NOT NULL,
28 MODIFY `email` varchar(128) NOT NULL;
c98f3b5d » alecpl
2008-06-12 #1485125: added index on messages.created
29
30 -- Updates from version 0.2-alpha
31
32 ALTER TABLE `messages`
33 ADD INDEX `created_index` (`created`);
be7d3b69 » alecpl
2008-11-21 - Fix 'cache' table cleanup on session destroy (#1485516)
34
161bb97f » alecpl
2010-06-15 - Added ALTER TABLE .. ENGINE=InnoDB, per discussion in #1486794
35 -- Updates from version 0.2-beta (InnoDB required)
be7d3b69 » alecpl
2008-11-21 - Fix 'cache' table cleanup on session destroy (#1485516)
36
37 ALTER TABLE `cache`
dcf780a6 » alecpl
2008-11-22 - fix r2076: removed cache.session_id column, removed DELETEs from ca…
38 DROP `session_id`;
161bb97f » alecpl
2010-06-15 - Added ALTER TABLE .. ENGINE=InnoDB, per discussion in #1486794
39
3e48d2ee » alecpl
2008-11-21 - Increase speed of session destroy and garbage clean up
40 ALTER TABLE `session`
41 ADD INDEX `changed_index` (`changed`);
e4d9f05e » alecpl
2008-11-24 - Added index on cache.created + small fixes in mssql DDL script
42
43 ALTER TABLE `cache`
44 ADD INDEX `created_index` (`created`);
debdda01 » alecpl
2008-11-25 #1485420: remove default (and not null) for users.language column in DDL
45
46 ALTER TABLE `users`
47 CHANGE `language` `language` varchar(5);
3d601d26 » alecpl
2009-09-07 - added index in messages table
48
161bb97f » alecpl
2010-06-15 - Added ALTER TABLE .. ENGINE=InnoDB, per discussion in #1486794
49 ALTER TABLE `cache` ENGINE=InnoDB;
50 ALTER TABLE `session` ENGINE=InnoDB;
51 ALTER TABLE `messages` ENGINE=InnoDB;
52 ALTER TABLE `users` ENGINE=InnoDB;
53 ALTER TABLE `contacts` ENGINE=InnoDB;
54 ALTER TABLE `identities` ENGINE=InnoDB;
55
3d601d26 » alecpl
2009-09-07 - added index in messages table
56 -- Updates from version 0.3-stable
57
f47e2dc5 » alecpl
2009-12-11 - move TRUNCATE before CREATE INDEX (#1486362)
58 TRUNCATE `messages`;
59
3d601d26 » alecpl
2009-09-07 - added index in messages table
60 ALTER TABLE `messages`
61 ADD INDEX `index_index` (`user_id`, `cache_key`, `idx`);
7fec6b2d » alecpl
2009-09-13 - "TRUNCATE messages" is required to remove buggy cache entries
62
b2b8b19c » vbenincasa
2009-09-17 - Change MySQL data type to avoid problems with big session vars
63 ALTER TABLE `session`
64 CHANGE `vars` `vars` MEDIUMTEXT NOT NULL;
23b76563 » alecpl
2009-09-29 - use better index for contacts table
65
66 ALTER TABLE `contacts`
67 ADD INDEX `user_contacts_index` (`user_id`,`email`);
8248e4a6 » alecpl
2010-02-06 - Add workaround for MySQL bug [http://bugs.mysql.com/bug.php?id=46293]…
68
69 -- Updates from version 0.3.1
fc552950 » alecpl
2010-09-14 - Added warning about tables engine, per discussion in #1486794
70 -- WARNING: Make sure that all tables are using InnoDB engine!!!
71 -- If not, use: ALTER TABLE xxx ENGINE=InnoDB;
8248e4a6 » alecpl
2010-02-06 - Add workaround for MySQL bug [http://bugs.mysql.com/bug.php?id=46293]…
72
73 /* MySQL bug workaround: http://bugs.mysql.com/bug.php?id=46293 */
5cec0c60 » alecpl
2010-02-06 - typo
74 /*!40014 SET FOREIGN_KEY_CHECKS=0 */;
8248e4a6 » alecpl
2010-02-06 - Add workaround for MySQL bug [http://bugs.mysql.com/bug.php?id=46293]…
75
76 ALTER TABLE `messages` DROP FOREIGN KEY `user_id_fk_messages`;
77 ALTER TABLE `cache` DROP FOREIGN KEY `user_id_fk_cache`;
78 ALTER TABLE `contacts` DROP FOREIGN KEY `user_id_fk_contacts`;
79 ALTER TABLE `identities` DROP FOREIGN KEY `user_id_fk_identities`;
80
81 ALTER TABLE `messages` ADD CONSTRAINT `user_id_fk_messages` FOREIGN KEY (`user_id`)
1aaeaaaa » alecpl
2010-06-14 - fix foreign keys defs unintentionally broken in r3333
82 REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;
8248e4a6 » alecpl
2010-02-06 - Add workaround for MySQL bug [http://bugs.mysql.com/bug.php?id=46293]…
83 ALTER TABLE `cache` ADD CONSTRAINT `user_id_fk_cache` FOREIGN KEY (`user_id`)
1aaeaaaa » alecpl
2010-06-14 - fix foreign keys defs unintentionally broken in r3333
84 REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;
8248e4a6 » alecpl
2010-02-06 - Add workaround for MySQL bug [http://bugs.mysql.com/bug.php?id=46293]…
85 ALTER TABLE `contacts` ADD CONSTRAINT `user_id_fk_contacts` FOREIGN KEY (`user_id`)
1aaeaaaa » alecpl
2010-06-14 - fix foreign keys defs unintentionally broken in r3333
86 REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;
8248e4a6 » alecpl
2010-02-06 - Add workaround for MySQL bug [http://bugs.mysql.com/bug.php?id=46293]…
87 ALTER TABLE `identities` ADD CONSTRAINT `user_id_fk_identities` FOREIGN KEY (`user_id`)
1aaeaaaa » alecpl
2010-06-14 - fix foreign keys defs unintentionally broken in r3333
88 REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;
8248e4a6 » alecpl
2010-02-06 - Add workaround for MySQL bug [http://bugs.mysql.com/bug.php?id=46293]…
89
951c07b1 » alecpl
2010-02-24 - Fix adding contacts SQL error on mysql (#1486459)
90 ALTER TABLE `contacts` ALTER `name` SET DEFAULT '';
91 ALTER TABLE `contacts` ALTER `firstname` SET DEFAULT '';
92 ALTER TABLE `contacts` ALTER `surname` SET DEFAULT '';
93
ac756e88 » alecpl
2010-03-09 - fix add index
94 ALTER TABLE `identities` ADD INDEX `user_identities_index` (`user_id`, `del`);
a35062a1 » thomascube
2010-04-15 Always set changed date when marking a DB record as deleted + provide…
95 ALTER TABLE `identities` ADD `changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00' AFTER `user_id`;
94fe9ca1 » alecpl
2010-03-06 - re-fix (#1486474) + require MySQL 4.0.8 + add index/update in ident…
96
a61bbb24 » thomascube
2010-03-26 Added basic contact groups feature
97 CREATE TABLE `contactgroups` (
98 `contactgroup_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
99 `user_id` int(10) UNSIGNED NOT NULL DEFAULT '0',
1924136b » alecpl
2010-03-27 - fix default datetime
100 `changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
a61bbb24 » thomascube
2010-03-26 Added basic contact groups feature
101 `del` tinyint(1) NOT NULL DEFAULT '0',
102 `name` varchar(128) NOT NULL DEFAULT '',
103 PRIMARY KEY(`contactgroup_id`),
104 CONSTRAINT `user_id_fk_contactgroups` FOREIGN KEY (`user_id`)
105 REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
106 INDEX `contactgroups_user_index` (`user_id`,`del`)
107 ) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */;
108
109 CREATE TABLE `contactgroupmembers` (
110 `contactgroup_id` int(10) UNSIGNED NOT NULL,
111 `contact_id` int(10) UNSIGNED NOT NULL DEFAULT '0',
1924136b » alecpl
2010-03-27 - fix default datetime
112 `created` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
a61bbb24 » thomascube
2010-03-26 Added basic contact groups feature
113 PRIMARY KEY (`contactgroup_id`, `contact_id`),
114 CONSTRAINT `contactgroup_id_fk_contactgroups` FOREIGN KEY (`contactgroup_id`)
115 REFERENCES `contactgroups`(`contactgroup_id`) ON DELETE CASCADE ON UPDATE CASCADE,
116 CONSTRAINT `contact_id_fk_contacts` FOREIGN KEY (`contact_id`)
117 REFERENCES `contacts`(`contact_id`) ON DELETE CASCADE ON UPDATE CASCADE
118 ) /*!40000 ENGINE=INNODB */;
119
5cec0c60 » alecpl
2010-02-06 - typo
120 /*!40014 SET FOREIGN_KEY_CHECKS=1 */;
e2402ef9 » alecpl
2010-04-28 - Set DEFAULT NULL for users.last_login
121
122 -- Updates from version 0.4-beta
123
124 ALTER TABLE `users` CHANGE `last_login` `last_login` datetime DEFAULT NULL;
125 UPDATE `users` SET `last_login` = NULL WHERE `last_login` = '1000-01-01 00:00:00';
ace511a7 » alecpl
2010-10-06 - Add unique index on users.username+users.mail_host
126
127 -- Updates from version 0.4.2
128
129 ALTER TABLE `users` DROP INDEX `username_index`;
130 ALTER TABLE `users` ADD UNIQUE `username` (`username`, `mail_host`);
131
6f096812 » alecpl
2010-11-02 - Support contact's email addresses up to 255 characters long (#1487095)
132 ALTER TABLE `contacts` MODIFY `email` varchar(255) NOT NULL;
133
cdb8b96e » thomascube
2011-01-26 Clear message cache table when upgrading
134 TRUNCATE TABLE `messages`;
135
faf10e8f » thomascube
2011-08-14 Fix automatic db updates; trigger contact indexing after upgrade
136 -- Updates from version 0.5.1
137 -- Updates from version 0.5.2
138 -- Updates from version 0.5.3
139 -- Updates from version 0.5.4
3e263735 » thomascube
2011-02-14 Fulltext search over contact fields. Attention: DATABASE SCHEMA CHANG…
140
141 ALTER TABLE `contacts` ADD `words` TEXT NULL AFTER `vcard`;
09b0e36b » thomascube
2011-04-27 Change vcard field to LONGTEXT to completely store vcards with embedd…
142 ALTER TABLE `contacts` CHANGE `vcard` `vcard` LONGTEXT /*!40101 CHARACTER SET utf8 */ NULL DEFAULT NULL;
3a5476d1 » alecpl
2011-02-23 - Add index on contactgroupmembers.contact_id column.
143 ALTER TABLE `contactgroupmembers` ADD INDEX `contactgroupmembers_contact_index` (`contact_id`);
d08333ea » alecpl
2011-05-05 - Fix problems with subfolders of INBOX folder on some IMAP servers (…
144
145 TRUNCATE TABLE `messages`;
146 TRUNCATE TABLE `cache`;
66df0842 » alecpl
2011-09-06 - Merge devel-spellcheck branch:
147
502436da » thomascube
2011-09-29 We're on the road towards 0.7 now
148 -- Updates from version 0.6
66df0842 » alecpl
2011-09-06 - Merge devel-spellcheck branch:
149
d2d94ac6 » alecpl
2011-12-15 - Disable FOREIGN_KEY_CHECKS in update from 0.6 (#1488209)
150 /*!40014 SET FOREIGN_KEY_CHECKS=0 */;
151
d5ae9772 » alecpl
2011-09-06 - Fix username case-insensitivity issue in MySQL (#1488021)
152 ALTER TABLE `users` CHANGE `alias` `alias` varchar(128) BINARY NOT NULL;
153 ALTER TABLE `users` CHANGE `username` `username` varchar(128) BINARY NOT NULL;
154
66df0842 » alecpl
2011-09-06 - Merge devel-spellcheck branch:
155 CREATE TABLE `dictionary` (
156 `user_id` int(10) UNSIGNED DEFAULT NULL,
157 `language` varchar(5) NOT NULL,
158 `data` longtext NOT NULL,
159 CONSTRAINT `user_id_fk_dictionary` FOREIGN KEY (`user_id`)
160 REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
161 UNIQUE `uniqueness` (`user_id`, `language`)
162 ) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */;
f8e48df7 » alecpl
2011-09-06 - Merge devel-saved_search branch (Addressbook Saved Searches)
163
164 CREATE TABLE `searches` (
165 `search_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
166 `user_id` int(10) UNSIGNED NOT NULL DEFAULT '0',
167 `type` int(3) NOT NULL DEFAULT '0',
168 `name` varchar(128) NOT NULL,
169 `data` text,
170 PRIMARY KEY(`search_id`),
171 CONSTRAINT `user_id_fk_searches` FOREIGN KEY (`user_id`)
172 REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
173 UNIQUE `uniqueness` (`user_id`, `type`, `name`)
174 ) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */;
80152b33 » alecpl
2011-09-07 - Rewritten messages caching (merged devel-mcache branch):
175
176 DROP TABLE `messages`;
177
178 CREATE TABLE `cache_index` (
179 `user_id` int(10) UNSIGNED NOT NULL DEFAULT '0',
180 `mailbox` varchar(255) BINARY NOT NULL,
181 `changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
7b2bf71c » alecpl
2011-09-19 - Add lost cache_index.valid column definition
182 `valid` tinyint(1) NOT NULL DEFAULT '0',
80152b33 » alecpl
2011-09-07 - Rewritten messages caching (merged devel-mcache branch):
183 `data` longtext NOT NULL,
184 CONSTRAINT `user_id_fk_cache_index` FOREIGN KEY (`user_id`)
185 REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
186 INDEX `changed_index` (`changed`),
187 PRIMARY KEY (`user_id`, `mailbox`)
188 ) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */;
189
190 CREATE TABLE `cache_thread` (
191 `user_id` int(10) UNSIGNED NOT NULL DEFAULT '0',
192 `mailbox` varchar(255) BINARY NOT NULL,
193 `changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
194 `data` longtext NOT NULL,
195 CONSTRAINT `user_id_fk_cache_thread` FOREIGN KEY (`user_id`)
196 REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
197 INDEX `changed_index` (`changed`),
198 PRIMARY KEY (`user_id`, `mailbox`)
199 ) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */;
200
201 CREATE TABLE `cache_messages` (
202 `user_id` int(10) UNSIGNED NOT NULL DEFAULT '0',
203 `mailbox` varchar(255) BINARY NOT NULL,
204 `uid` int(11) UNSIGNED NOT NULL DEFAULT '0',
205 `changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
206 `data` longtext NOT NULL,
609d3923 » alecpl
2011-09-18 - Cache synchronization using QRESYNC/CONDSTORE
207 `flags` int(11) NOT NULL DEFAULT '0',
80152b33 » alecpl
2011-09-07 - Rewritten messages caching (merged devel-mcache branch):
208 CONSTRAINT `user_id_fk_cache_messages` FOREIGN KEY (`user_id`)
209 REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
210 INDEX `changed_index` (`changed`),
211 PRIMARY KEY (`user_id`, `mailbox`, `uid`)
212 ) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */;
b8ae0ecb » alecpl
2011-11-22 - Fixed bug where session ID's length was limited to 40 characters. S…
213
d2d94ac6 » alecpl
2011-12-15 - Disable FOREIGN_KEY_CHECKS in update from 0.6 (#1488209)
214 /*!40014 SET FOREIGN_KEY_CHECKS=1 */;
215
f4507434 » alecpl
2011-11-23 - Add version markers
216 -- Updates from version 0.7-beta
217
b8ae0ecb » alecpl
2011-11-22 - Fixed bug where session ID's length was limited to 40 characters. S…
218 ALTER TABLE `session` CHANGE `sess_id` `sess_id` varchar(128) NOT NULL;
Something went wrong with that request. Please try again.