From 3a5476d150419b46847dd922935f368c969519c1 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Wed, 23 Feb 2011 08:13:02 +0000
Subject: - Add index on contactgroupmembers.contact_id column.   Improves
 performance and fixes problem with contactgroupmembers table creation on
 MySQL 4.x

---
 SQL/mysql.initial.sql | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'SQL/mysql.initial.sql')

diff --git a/SQL/mysql.initial.sql b/SQL/mysql.initial.sql
index accf212d4..8e2e61c9e 100644
--- a/SQL/mysql.initial.sql
+++ b/SQL/mysql.initial.sql
@@ -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 */;
 
 
-- 
cgit v1.2.3

