From d9cf711efbbdae8e490bab3c7dc8956e85f5962c Mon Sep 17 00:00:00 2001 From: kurund Date: Sat, 8 Feb 2014 11:15:03 -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 | 8 ++++++++ xml/schema/Core/ActionSchedule.xml | 12 ++++++------ xml/schema/Core/CustomField.xml | 8 ++++---- xml/schema/Core/CustomGroup.xml | 4 ++-- xml/schema/Core/Extension.xml | 4 ++-- xml/schema/Core/Job.xml | 4 ++-- 6 files changed, 24 insertions(+), 16 deletions(-) diff --git a/CRM/Upgrade/Incremental/sql/4.5.alpha1.mysql.tpl b/CRM/Upgrade/Incremental/sql/4.5.alpha1.mysql.tpl index 4d1d1f9a99..0d93b45d09 100644 --- a/CRM/Upgrade/Incremental/sql/4.5.alpha1.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/4.5.alpha1.mysql.tpl @@ -219,5 +219,13 @@ ALTER TABLE `civicrm_dedupe_rule_group` CHANGE `used` `used` VARCHAR( 12 ) CH 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).'; +ALTER TABLE `civicrm_job` CHANGE `run_frequency` `run_frequency` VARCHAR( 8 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT 'Daily' COMMENT 'Scheduled job run frequency.'; +ALTER TABLE `civicrm_extension` CHANGE `type` `type` VARCHAR( 8 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; +ALTER TABLE `civicrm_custom_group` CHANGE `style` `style` VARCHAR( 8 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT 'Visual relationship between this form and its parent.'; +ALTER TABLE `civicrm_custom_field` CHANGE `data_type` `data_type` VARCHAR( 16 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT 'Controls location of data storage in extended_data table.'; +ALTER TABLE `civicrm_custom_field` CHANGE `html_type` `html_type` VARCHAR( 32 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT 'HTML types plus several built-in extended types.'; +ALTER TABLE `civicrm_action_schedule` CHANGE `start_action_unit` `start_action_unit` VARCHAR( 8 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT 'Time units for reminder.'; +ALTER TABLE `civicrm_action_schedule` CHANGE `repetition_frequency_unit` `repetition_frequency_unit` VARCHAR( 8 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT 'Time units for repetition of reminder.'; +ALTER TABLE `civicrm_action_schedule` CHANGE `end_frequency_unit` `end_frequency_unit` VARCHAR( 8 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT 'Time units till repetition of reminder.'; diff --git a/xml/schema/Core/ActionSchedule.xml b/xml/schema/Core/ActionSchedule.xml index 059200a6c7..2688420f12 100644 --- a/xml/schema/Core/ActionSchedule.xml +++ b/xml/schema/Core/ActionSchedule.xml @@ -68,8 +68,8 @@ start_action_unit - enum - hour,day,week,month,year + varchar + 8 Time units for reminder. 3.4 @@ -99,8 +99,8 @@ repetition_frequency_unit - enum - hour,day,week,month,year + varchar + 8 Time units for repetition of reminder. 3.4 @@ -115,8 +115,8 @@ end_frequency_unit - enum - hour,day,week,month,year + varchar + 8 Time units till repetition of reminder. 3.4 diff --git a/xml/schema/Core/CustomField.xml b/xml/schema/Core/CustomField.xml index a161ef20e7..0de4d036a1 100644 --- a/xml/schema/Core/CustomField.xml +++ b/xml/schema/Core/CustomField.xml @@ -58,8 +58,8 @@ data_type - enum - String, Int, Float, Money, Memo, Date, Boolean, StateProvince, Country, File, Link, ContactReference + varchar + 16 true Controls location of data storage in extended_data table. 1.1 @@ -69,8 +69,8 @@ html_type - enum - Text, TextArea, Select, Multi-Select, AdvMulti-Select, Radio, CheckBox, Select Date, Select State/Province, Select Country, Multi-Select Country, Multi-Select State/Province, File, Link, RichTextEditor, Autocomplete-Select + varchar + 32 true HTML types plus several built-in extended types. 1.1 diff --git a/xml/schema/Core/CustomGroup.xml b/xml/schema/Core/CustomGroup.xml index 3e2319bb48..0318cb6555 100644 --- a/xml/schema/Core/CustomGroup.xml +++ b/xml/schema/Core/CustomGroup.xml @@ -67,8 +67,8 @@ style - enum - Tab, Inline + varchar + 8 Visual relationship between this form and its parent. 1.1 diff --git a/xml/schema/Core/Extension.xml b/xml/schema/Core/Extension.xml index 00ccaea284..632bb5c232 100644 --- a/xml/schema/Core/Extension.xml +++ b/xml/schema/Core/Extension.xml @@ -20,8 +20,8 @@ type Type - enum - payment, search, report, module, sms + varchar + 8 true 4.2 diff --git a/xml/schema/Core/Job.xml b/xml/schema/Core/Job.xml index 1398135699..b86bdff9e8 100644 --- a/xml/schema/Core/Job.xml +++ b/xml/schema/Core/Job.xml @@ -33,8 +33,8 @@ run_frequency - enum - Hourly, Daily, Always + varchar + 8 "Daily" Scheduled job run frequency. 4.1 -- 2.25.1