From 71c65f5ebe72ac3871d90aeaeb9278602362b302 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Fri, 13 Feb 2015 17:01:44 -0800 Subject: [PATCH] CRM-15361, CRM-15857 - Set default location_type_id The default value of '0' is invalid. It should be NULL. In the original UI for location_type_id (patched but unreleased for 4.6), the default behavior was to set the value to NULL, so it seems implicit that NULL is an acceptable value. --- CRM/Upgrade/Incremental/sql/4.6.alpha7.mysql.tpl | 5 ++++- xml/schema/Mailing/Mailing.xml | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CRM/Upgrade/Incremental/sql/4.6.alpha7.mysql.tpl b/CRM/Upgrade/Incremental/sql/4.6.alpha7.mysql.tpl index 38d8c389ea..d27ff06717 100644 --- a/CRM/Upgrade/Incremental/sql/4.6.alpha7.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/4.6.alpha7.mysql.tpl @@ -1 +1,4 @@ -{* file to handle db changes in 4.6.alpha7 during upgrade *} \ No newline at end of file +{* file to handle db changes in 4.6.alpha7 during upgrade *} + +-- location_type_id should have default NULL, not invalid id 0 +ALTER TABLE civicrm_mailing CHANGE `location_type_id` `location_type_id` int(10) unsigned DEFAULT NULL COMMENT 'With email_selection_method, determines which email address to use'; diff --git a/xml/schema/Mailing/Mailing.xml b/xml/schema/Mailing/Mailing.xml index 32dc35f455..872f7de10f 100644 --- a/xml/schema/Mailing/Mailing.xml +++ b/xml/schema/Mailing/Mailing.xml @@ -399,7 +399,6 @@ location_type_id Location Type int unsigned - 0 With email_selection_method, determines which email address to use civicrm_location_type
-- 2.25.1