From befed893f8fc3de03ab3e70acce96fecdde61658 Mon Sep 17 00:00:00 2001 From: CiviCRM Dev User Date: Fri, 20 Feb 2015 13:14:40 -0500 Subject: [PATCH] CRM-15361 - foreign key constraint for location type id --- CRM/Upgrade/Incremental/sql/4.6.beta1.mysql.tpl | 3 +++ xml/schema/Mailing/Mailing.xml | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/CRM/Upgrade/Incremental/sql/4.6.beta1.mysql.tpl b/CRM/Upgrade/Incremental/sql/4.6.beta1.mysql.tpl index ac3fdd22a5..ed9505bfc4 100644 --- a/CRM/Upgrade/Incremental/sql/4.6.beta1.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/4.6.beta1.mysql.tpl @@ -1 +1,4 @@ {* file to handle db changes in 4.6.beta1 during upgrade *} +-- See https://issues.civicrm.org/jira/browse/CRM-15361 +ALTER TABLE civicrm_mailing ADD CONSTRAINT FK_civicrm_mailing_location_type_id FOREIGN KEY FK_civicrm_mailing_location_type_id(`location_type_id`) REFERENCES `civicrm_location_type`(`id`) ON DELETE SET NULL; + diff --git a/xml/schema/Mailing/Mailing.xml b/xml/schema/Mailing/Mailing.xml index 8d779b984b..a92582723b 100644 --- a/xml/schema/Mailing/Mailing.xml +++ b/xml/schema/Mailing/Mailing.xml @@ -407,6 +407,13 @@ 4.6 + + location_type_id + civicrm_location_type
+ id + SET NULL + 4.6 +
email_selection_method varchar -- 2.25.1