CRM-15361 - foreign key constraint for location type id
authorCiviCRM Dev User <civicrm@piglet.mayfirst.org>
Fri, 20 Feb 2015 18:14:40 +0000 (13:14 -0500)
committerCiviCRM Dev User <civicrm@piglet.mayfirst.org>
Fri, 20 Feb 2015 18:14:40 +0000 (13:14 -0500)
CRM/Upgrade/Incremental/sql/4.6.beta1.mysql.tpl
xml/schema/Mailing/Mailing.xml

index ac3fdd22a5b98ea1b408c746c13b1f1672f69123..ed9505bfc458e1e1e7f93d96d78458219b7ef89b 100644 (file)
@@ -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;
+
index 8d779b984b5ab85558071ff195c37e20230791d0..a92582723b468ff4d5e2722705c5d74b38b80f01 100644 (file)
     </pseudoconstant>
     <add>4.6</add>
   </field>
+  <foreignKey>
+    <name>location_type_id</name>
+    <table>civicrm_location_type</table>
+    <key>id</key>
+    <onDelete>SET NULL</onDelete>
+    <add>4.6</add>
+  </foreignKey>
   <field>
     <name>email_selection_method</name>
     <type>varchar</type>