- Add index on contactgroupmembers.contact_id column.

Improves performance and fixes problem with contactgroupmembers table creation on MySQL 4.x
release-0.6
alecpl 14 years ago
parent 5744bfa54d
commit 3a5476d150

@ -1,6 +1,7 @@
CHANGELOG Roundcube Webmail
===========================
- Fix problem with contactgroupmembers table creation on MySQL 4.x, add index on contact_id column
- Add LDAP SASL bind and proxy authentication (#1486692)
- Add variable for 'Today' label in date_today option (#1486120)
- Fix dont_override setting does not override existing user preferences (#1487664)

@ -195,6 +195,8 @@ ALTER TABLE [dbo].[contactgroupmembers] ADD
CONSTRAINT [DF_contactgroupmembers_created] DEFAULT (getdate()) FOR [created]
GO
CREATE INDEX [IX_contactgroupmembers_contact_id] ON [dbo].[contactgroupmembers]([contact_id]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[identities] ADD
CONSTRAINT [DF_identities_user] DEFAULT ('0') FOR [user_id],

@ -101,3 +101,5 @@ GO
ALTER TABLE [dbo].[contacts] ADD [words] [text] COLLATE Latin1_General_CI_AI NULL
GO
CREATE INDEX [IX_contactgroupmembers_contact_id] ON [dbo].[contactgroupmembers]([contact_id]) ON [PRIMARY]
GO

@ -117,7 +117,8 @@ CREATE TABLE `contactgroupmembers` (
CONSTRAINT `contactgroup_id_fk_contactgroups` FOREIGN KEY (`contactgroup_id`)
REFERENCES `contactgroups`(`contactgroup_id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `contact_id_fk_contacts` FOREIGN KEY (`contact_id`)
REFERENCES `contacts`(`contact_id`) ON DELETE CASCADE ON UPDATE CASCADE
REFERENCES `contacts`(`contact_id`) ON DELETE CASCADE ON UPDATE CASCADE,
INDEX `contactgroupmembers_contact_index` (`contact_id`)
) /*!40000 ENGINE=INNODB */;

@ -136,3 +136,5 @@ TRUNCATE TABLE `messages`;
-- Updates from version 0.5.*
ALTER TABLE `contacts` ADD `words` TEXT NULL AFTER `vcard`;
ALTER TABLE `contactgroupmembers` ADD INDEX `contactgroupmembers_contact_index` (`contact_id`);

@ -157,6 +157,8 @@ CREATE TABLE contactgroupmembers (
PRIMARY KEY (contactgroup_id, contact_id)
);
CREATE INDEX contactgroupmembers_contact_id_idx ON contactgroupmembers (contact_id);
--
-- Sequence "cache_ids"
-- Name: cache_ids; Type: SEQUENCE; Schema: public; Owner: postgres

@ -90,8 +90,7 @@ ALTER TABLE contacts ALTER email TYPE varchar(255);
TRUNCATE messages;
-- Updates from version 0.5.x
ALTER TABLE contacts ADD words TEXT NULL;
CREATE INDEX contactgroupmembers_contact_id_idx ON contactgroupmembers (contact_id);

@ -56,6 +56,8 @@ CREATE TABLE contactgroupmembers (
PRIMARY KEY (contactgroup_id, contact_id)
);
CREATE INDEX ix_contactgroupmembers_contact_id ON contactgroupmembers (contact_id);
-- --------------------------------------------------------

@ -221,3 +221,4 @@ CREATE INDEX ix_contacts_user_id ON contacts(user_id, email);
DROP TABLE contacts_tmp;
DELETE FROM messages;
CREATE INDEX ix_contactgroupmembers_contact_id ON contactgroupmembers (contact_id);

Loading…
Cancel
Save