From: Tim Otten Date: Sat, 14 Feb 2015 01:01:44 +0000 (-0800) Subject: CRM-15361, CRM-15857 - Set default location_type_id X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=71c65f5ebe72ac3871d90aeaeb9278602362b302;p=civicrm-core.git 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. --- 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