From 909ca5f6050557c46bd9ab19a10e58b813d5b4c2 Mon Sep 17 00:00:00 2001 From: kurund Date: Fri, 7 Feb 2014 22:54:41 -0800 Subject: [PATCH] CRM-14181 fixes - migrate enums to varchar in schema for all tables http://issues.civicrm.org/jira/browse/CRM-14181 --- CRM/Upgrade/Incremental/sql/4.5.alpha1.mysql.tpl | 7 +++++++ xml/schema/Core/MappingField.xml | 4 ++-- xml/schema/Core/UFField.xml | 4 ++-- xml/schema/Core/WordReplacement.xml | 4 ++-- xml/schema/Dedupe/RuleGroup.xml | 8 ++++---- xml/schema/Event/ParticipantStatusType.xml | 4 ++-- 6 files changed, 19 insertions(+), 12 deletions(-) diff --git a/CRM/Upgrade/Incremental/sql/4.5.alpha1.mysql.tpl b/CRM/Upgrade/Incremental/sql/4.5.alpha1.mysql.tpl index 8d5d0584dc..4d1d1f9a99 100644 --- a/CRM/Upgrade/Incremental/sql/4.5.alpha1.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/4.5.alpha1.mysql.tpl @@ -213,4 +213,11 @@ ALTER TABLE `civicrm_mailing_group` CHANGE `group_type` `group_type` VARCHAR( ALTER TABLE `civicrm_mailing` CHANGE `visibility` `visibility` VARCHAR( 40 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT 'User and User Admin Only' COMMENT 'In what context(s) is the mailing contents visible (online viewing)'; ALTER TABLE `civicrm_mailing_component` CHANGE `component_type` `component_type` VARCHAR( 12 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT 'Type of Component.'; ALTER TABLE `civicrm_mailing_bounce_type` CHANGE `name` `name` VARCHAR( 12 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT 'Type of bounce'; +ALTER TABLE `civicrm_participant_status_type` CHANGE `class` `class` VARCHAR( 8 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT 'the general group of status type this one belongs to'; +ALTER TABLE `civicrm_dedupe_rule_group` CHANGE `contact_type` `contact_type` VARCHAR( 12 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT 'The type of contacts this group applies to'; +ALTER TABLE `civicrm_dedupe_rule_group` CHANGE `used` `used` VARCHAR( 12 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT 'Whether the rule should be used for cases where usage is Unsupervised, Supervised OR General(programatically)'; +ALTER TABLE `civicrm_word_replacement` CHANGE `match_type` `match_type` VARCHAR( 16 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT 'wildcardMatch'; +ALTER TABLE `civicrm_uf_field` CHANGE `visibility` `visibility` VARCHAR( 32 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT 'User and User Admin Only' COMMENT 'In what context(s) is this field visible.'; +ALTER TABLE `civicrm_mapping_field` CHANGE `operator` `operator` VARCHAR( 16 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT 'SQL WHERE operator for search-builder mapping fields (search criteria).'; + diff --git a/xml/schema/Core/MappingField.xml b/xml/schema/Core/MappingField.xml index 1094e08af1..f679d844fd 100644 --- a/xml/schema/Core/MappingField.xml +++ b/xml/schema/Core/MappingField.xml @@ -137,9 +137,9 @@ operator + varchar + 16 enum - =, !=, >, <, >=, <=, - IN, NOT IN, LIKE, NOT LIKE, IS NULL, IS NOT NULL, IS NOT EMPTY, IS EMPTY SQL WHERE operator for search-builder mapping fields (search criteria). 1.5 diff --git a/xml/schema/Core/UFField.xml b/xml/schema/Core/UFField.xml index c2ca6d33df..ac7e5abc18 100644 --- a/xml/schema/Core/UFField.xml +++ b/xml/schema/Core/UFField.xml @@ -109,8 +109,8 @@ visibility - enum - User and User Admin Only,Public Pages,Public Pages and Listings + varchar + 32 'User and User Admin Only' In what context(s) is this field visible. 1.1 diff --git a/xml/schema/Core/WordReplacement.xml b/xml/schema/Core/WordReplacement.xml index 573579c1aa..012c51adaf 100644 --- a/xml/schema/Core/WordReplacement.xml +++ b/xml/schema/Core/WordReplacement.xml @@ -50,8 +50,8 @@ match_type - enum - wildcardMatch, exactMatch + varchar + 16 "wildcardMatch" 4.4 diff --git a/xml/schema/Dedupe/RuleGroup.xml b/xml/schema/Dedupe/RuleGroup.xml index 979c732e3e..6ec09dce67 100644 --- a/xml/schema/Dedupe/RuleGroup.xml +++ b/xml/schema/Dedupe/RuleGroup.xml @@ -18,8 +18,8 @@ contact_type - enum - Individual, Organization, Household + varchar + 12 The type of contacts this group applies to 1.8 @@ -43,8 +43,8 @@ used - enum - Unsupervised, Supervised, General + varchar + 12 true Whether the rule should be used for cases where usage is Unsupervised, Supervised OR General(programatically) 4.3 diff --git a/xml/schema/Event/ParticipantStatusType.xml b/xml/schema/Event/ParticipantStatusType.xml index 4bae143710..c1449baa80 100644 --- a/xml/schema/Event/ParticipantStatusType.xml +++ b/xml/schema/Event/ParticipantStatusType.xml @@ -39,8 +39,8 @@ class - enum - Positive, Pending, Waiting, Negative + varchar + 8 the general group of status type this one belongs to 3.0 -- 2.25.1