Changeset 5711 in subversion
- Timestamp:
- Jan 5, 2012 3:45:22 AM (17 months ago)
- Location:
- trunk/roundcubemail
- Files:
-
- 9 edited
-
CHANGELOG (modified) (1 diff)
-
SQL/mssql.initial.sql (modified) (1 diff)
-
SQL/mssql.upgrade.sql (modified) (1 diff)
-
SQL/mysql.initial.sql (modified) (9 diffs)
-
SQL/mysql.update.sql (modified) (1 diff)
-
SQL/postgres.initial.sql (modified) (2 diffs)
-
SQL/postgres.update.sql (modified) (1 diff)
-
SQL/sqlite.initial.sql (modified) (2 diffs)
-
SQL/sqlite.update.sql (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/CHANGELOG
r5708 r5711 2 2 =========================== 3 3 4 - Fix SQL Error when saving a contact with many email addresses (#1488286) 4 5 - Fix strict email address searching if contact has more than one address 5 6 - Use proper timezones from PHP's internal timezonedb (#1485592) -
trunk/roundcubemail/SQL/mssql.initial.sql
r5460 r5711 41 41 [del] [char] (1) COLLATE Latin1_General_CI_AI NOT NULL , 42 42 [name] [varchar] (128) COLLATE Latin1_General_CI_AI NOT NULL , 43 [email] [ varchar] (255)COLLATE Latin1_General_CI_AI NOT NULL ,43 [email] [text] COLLATE Latin1_General_CI_AI NOT NULL , 44 44 [firstname] [varchar] (128) COLLATE Latin1_General_CI_AI NOT NULL , 45 45 [surname] [varchar] (128) COLLATE Latin1_General_CI_AI NOT NULL , -
trunk/roundcubemail/SQL/mssql.upgrade.sql
r5468 r5711 245 245 GO 246 246 247 -- Updates from version 0.7 248 249 ALTER TABLE [dbo].[contacts] ALTER COLUMN [email] [text] COLLATE Latin1_General_CI_AI NOT NULL 250 GO 251 -
trunk/roundcubemail/SQL/mysql.initial.sql
r5460 r5711 41 41 `created` datetime NOT NULL DEFAULT '1000-01-01 00:00:00', 42 42 `data` longtext NOT NULL, 43 `user_id` int(10) UNSIGNED NOT NULL DEFAULT '0',43 `user_id` int(10) UNSIGNED NOT NULL, 44 44 PRIMARY KEY(`cache_id`), 45 45 CONSTRAINT `user_id_fk_cache` FOREIGN KEY (`user_id`) … … 53 53 54 54 CREATE TABLE `cache_index` ( 55 `user_id` int(10) UNSIGNED NOT NULL DEFAULT '0',55 `user_id` int(10) UNSIGNED NOT NULL, 56 56 `mailbox` varchar(255) BINARY NOT NULL, 57 57 `changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00', … … 68 68 69 69 CREATE TABLE `cache_thread` ( 70 `user_id` int(10) UNSIGNED NOT NULL DEFAULT '0',70 `user_id` int(10) UNSIGNED NOT NULL, 71 71 `mailbox` varchar(255) BINARY NOT NULL, 72 72 `changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00', … … 82 82 83 83 CREATE TABLE `cache_messages` ( 84 `user_id` int(10) UNSIGNED NOT NULL DEFAULT '0',84 `user_id` int(10) UNSIGNED NOT NULL, 85 85 `mailbox` varchar(255) BINARY NOT NULL, 86 86 `uid` int(11) UNSIGNED NOT NULL DEFAULT '0', … … 102 102 `del` tinyint(1) NOT NULL DEFAULT '0', 103 103 `name` varchar(128) NOT NULL DEFAULT '', 104 `email` varchar(255) NOT NULL,104 `email` text NOT NULL DEFAULT '', 105 105 `firstname` varchar(128) NOT NULL DEFAULT '', 106 106 `surname` varchar(128) NOT NULL DEFAULT '', 107 107 `vcard` longtext NULL, 108 108 `words` text NULL, 109 `user_id` int(10) UNSIGNED NOT NULL DEFAULT '0',109 `user_id` int(10) UNSIGNED NOT NULL, 110 110 PRIMARY KEY(`contact_id`), 111 111 CONSTRAINT `user_id_fk_contacts` FOREIGN KEY (`user_id`) 112 112 REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE, 113 INDEX `user_contacts_index` (`user_id`,` email`)113 INDEX `user_contacts_index` (`user_id`,`del`) 114 114 ) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */; 115 115 … … 118 118 CREATE TABLE `contactgroups` ( 119 119 `contactgroup_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, 120 `user_id` int(10) UNSIGNED NOT NULL DEFAULT '0',120 `user_id` int(10) UNSIGNED NOT NULL, 121 121 `changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00', 122 122 `del` tinyint(1) NOT NULL DEFAULT '0', … … 130 130 CREATE TABLE `contactgroupmembers` ( 131 131 `contactgroup_id` int(10) UNSIGNED NOT NULL, 132 `contact_id` int(10) UNSIGNED NOT NULL DEFAULT '0',132 `contact_id` int(10) UNSIGNED NOT NULL, 133 133 `created` datetime NOT NULL DEFAULT '1000-01-01 00:00:00', 134 134 PRIMARY KEY (`contactgroup_id`, `contact_id`), … … 145 145 CREATE TABLE `identities` ( 146 146 `identity_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, 147 `user_id` int(10) UNSIGNED NOT NULL DEFAULT '0',147 `user_id` int(10) UNSIGNED NOT NULL, 148 148 `changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00', 149 149 `del` tinyint(1) NOT NULL DEFAULT '0', … … 179 179 CREATE TABLE `searches` ( 180 180 `search_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, 181 `user_id` int(10) UNSIGNED NOT NULL DEFAULT '0',181 `user_id` int(10) UNSIGNED NOT NULL, 182 182 `type` int(3) NOT NULL DEFAULT '0', 183 183 `name` varchar(128) NOT NULL, -
trunk/roundcubemail/SQL/mysql.update.sql
r5618 r5711 217 217 218 218 ALTER TABLE `session` CHANGE `sess_id` `sess_id` varchar(128) NOT NULL; 219 220 -- Updates from version 0.7 221 222 ALTER TABLE `contacts` DROP FOREIGN KEY `user_id_fk_contacts`; 223 ALTER TABLE `contacts` DROP INDEX `user_contacts_index`; 224 ALTER TABLE `contacts` MODIFY `email` text NOT NULL DEFAULT ''; 225 ALTER TABLE `contacts` ADD INDEX `user_contacts_index` (`user_id`,`del`); 226 ALTER TABLE `contacts` ADD CONSTRAINT `user_id_fk_contacts` FOREIGN KEY (`user_id`) 227 REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE; 228 229 ALTER TABLE `cache` ALTER `user_id` DROP DEFAULT; 230 ALTER TABLE `cache_index` ALTER `user_id` DROP DEFAULT; 231 ALTER TABLE `cache_thread` ALTER `user_id` DROP DEFAULT; 232 ALTER TABLE `cache_messages` ALTER `user_id` DROP DEFAULT; 233 ALTER TABLE `contacts` ALTER `user_id` DROP DEFAULT; 234 ALTER TABLE `contactgroups` ALTER `user_id` DROP DEFAULT; 235 ALTER TABLE `contactgroupmembers` ALTER `contact_id` DROP DEFAULT; 236 ALTER TABLE `identities` ALTER `user_id` DROP DEFAULT; 237 ALTER TABLE `searches` ALTER `user_id` DROP DEFAULT; -
trunk/roundcubemail/SQL/postgres.initial.sql
r5460 r5711 108 108 del smallint DEFAULT 0 NOT NULL, 109 109 name varchar(128) DEFAULT '' NOT NULL, 110 email varchar(255)DEFAULT '' NOT NULL,110 email text DEFAULT '' NOT NULL, 111 111 firstname varchar(128) DEFAULT '' NOT NULL, 112 112 surname varchar(128) DEFAULT '' NOT NULL, … … 115 115 ); 116 116 117 CREATE INDEX contacts_user_id_idx ON contacts (user_id, email);117 CREATE INDEX contacts_user_id_idx ON contacts (user_id, del); 118 118 119 119 -- -
trunk/roundcubemail/SQL/postgres.update.sql
r5627 r5711 170 170 171 171 ALTER TABLE "session" ALTER sess_id TYPE varchar(128); 172 173 -- Updates from version 0.7 174 175 DROP INDEX contacts_user_id_idx; 176 CREATE INDEX contacts_user_id_idx ON contacts USING btree (user_id, del); 177 ALTER TABLE contacts ALTER email TYPE text; -
trunk/roundcubemail/SQL/sqlite.initial.sql
r5615 r5711 25 25 CREATE TABLE contacts ( 26 26 contact_id integer NOT NULL PRIMARY KEY, 27 user_id integer NOT NULL default '0',27 user_id integer NOT NULL, 28 28 changed datetime NOT NULL default '0000-00-00 00:00:00', 29 29 del tinyint NOT NULL default '0', 30 30 name varchar(128) NOT NULL default '', 31 email varchar(255)NOT NULL default '',31 email text NOT NULL default '', 32 32 firstname varchar(128) NOT NULL default '', 33 33 surname varchar(128) NOT NULL default '', … … 36 36 ); 37 37 38 CREATE INDEX ix_contacts_user_id ON contacts(user_id, email);38 CREATE INDEX ix_contacts_user_id ON contacts(user_id, del); 39 39 40 40 -
trunk/roundcubemail/SQL/sqlite.update.sql
r5615 r5711 294 294 vars text NOT NULL 295 295 ); 296 297 296 CREATE INDEX ix_session_changed ON session (changed); 297 298 -- Updates from version 0.7 299 300 CREATE TABLE contacts_tmp ( 301 contact_id integer NOT NULL PRIMARY KEY, 302 user_id integer NOT NULL, 303 changed datetime NOT NULL default '0000-00-00 00:00:00', 304 del tinyint NOT NULL default '0', 305 name varchar(128) NOT NULL default '', 306 email text NOT NULL default '', 307 firstname varchar(128) NOT NULL default '', 308 surname varchar(128) NOT NULL default '', 309 vcard text NOT NULL default '', 310 words text NOT NULL default '' 311 ); 312 313 INSERT INTO contacts_tmp (contact_id, user_id, changed, del, name, email, firstname, surname, vcard, words) 314 SELECT contact_id, user_id, changed, del, name, email, firstname, surname, vcard, words FROM contacts; 315 316 DROP TABLE contacts; 317 318 CREATE TABLE contacts ( 319 contact_id integer NOT NULL PRIMARY KEY, 320 user_id integer NOT NULL, 321 changed datetime NOT NULL default '0000-00-00 00:00:00', 322 del tinyint NOT NULL default '0', 323 name varchar(128) NOT NULL default '', 324 email text NOT NULL default '', 325 firstname varchar(128) NOT NULL default '', 326 surname varchar(128) NOT NULL default '', 327 vcard text NOT NULL default '', 328 words text NOT NULL default '' 329 ); 330 331 INSERT INTO contacts (contact_id, user_id, changed, del, name, email, firstname, surname, vcard, words) 332 SELECT contact_id, user_id, changed, del, name, email, firstname, surname, vcard, words FROM contacts_tmp; 333 334 CREATE INDEX ix_contacts_user_id ON contacts(user_id, del); 335 DROP TABLE contacts_tmp;
Note: See TracChangeset
for help on using the changeset viewer.
