CRM-15196 mysql 5.6 is too strict on altering columns which have fks
authorEileen McNaughton <eileen@fuzion.co.nz>
Wed, 27 Aug 2014 23:37:49 +0000 (11:37 +1200)
committerEileen McNaughton <eileen@fuzion.co.nz>
Wed, 27 Aug 2014 23:41:39 +0000 (11:41 +1200)
CRM/Upgrade/Incremental/sql/4.4.alpha1.mysql.tpl

index d82c8ae125f3bba2acc5c85e0970123ceb1b2a6c..c3c3c63f3d19d6538a8a486aa72f8225c9a99b50 100644 (file)
@@ -67,9 +67,11 @@ ALTER TABLE `civicrm_custom_group`
   ADD COLUMN `is_reserved` tinyint(4) DEFAULT '0' COMMENT 'Is this a reserved Custom Group?';
 
 --CRM-12986 fix event_id & contact_id to NOT NULL fields on participant table
+SET foreign_key_checks = 0;
 ALTER TABLE `civicrm_participant`
   CHANGE COLUMN `event_id` `event_id` INT(10) UNSIGNED NOT NULL,
   CHANGE COLUMN `contact_id` `contact_id` INT(10) UNSIGNED NOT NULL;
+SET foreign_key_checks = 1;
 
 -- CRM-12964 civicrm_print_label table creation
 CREATE TABLE IF NOT EXISTS `civicrm_print_label` (