CRM-14181 fixes - migrate enums to varchar in schema for all tables
authorkurund <kurund@civicrm.org>
Sat, 8 Feb 2014 19:15:03 +0000 (11:15 -0800)
committerkurund <kurund@civicrm.org>
Sat, 8 Feb 2014 19:15:03 +0000 (11:15 -0800)
http://issues.civicrm.org/jira/browse/CRM-14181

CRM/Upgrade/Incremental/sql/4.5.alpha1.mysql.tpl
xml/schema/Core/ActionSchedule.xml
xml/schema/Core/CustomField.xml
xml/schema/Core/CustomGroup.xml
xml/schema/Core/Extension.xml
xml/schema/Core/Job.xml

index 4d1d1f9a99ce256b0312fd5444b40ba0f4b82e29..0d93b45d0947ed6bf07a007ffee7d5c228861c0d 100644 (file)
@@ -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.';
 
 
index 059200a6c7d119e5dd9b4020848d6020fd1b1355..2688420f12ec53dfa8a82b2332dd24ebfb961bc8 100644 (file)
@@ -68,8 +68,8 @@
   </field>
   <field>
        <name>start_action_unit</name>
-       <type>enum</type>
-       <values>hour,day,week,month,year</values>
+       <type>varchar</type>
+       <length>8</length>
        <comment>Time units for reminder.</comment>
        <add>3.4</add>
        <html>
@@ -99,8 +99,8 @@
   </field>
   <field>
        <name>repetition_frequency_unit</name>
-       <type>enum</type>
-       <values>hour,day,week,month,year</values>
+       <type>varchar</type>
+       <length>8</length>
        <comment>Time units for repetition of reminder.</comment>
        <add>3.4</add>
        <html>
   </field>
   <field>
        <name>end_frequency_unit</name>
-       <type>enum</type>
-       <values>hour,day,week,month,year</values>
+       <type>varchar</type>
+       <length>8</length>
        <comment>Time units till repetition of reminder.</comment>
        <add>3.4</add>
        <html>
index a161ef20e7178e1c88d26a8350063ec8d82a9802..0de4d036a12f7dd81569149cc1ea100402f6c488 100644 (file)
@@ -58,8 +58,8 @@
   </field>
   <field>
      <name>data_type</name>
-     <type>enum</type>
-     <values>String, Int, Float, Money, Memo, Date, Boolean, StateProvince, Country, File, Link, ContactReference</values>
+     <type>varchar</type>
+     <length>16</length>
      <required>true</required>
      <comment>Controls location of data storage in extended_data table.</comment>
      <add>1.1</add>
@@ -69,8 +69,8 @@
   </field>
   <field>
      <name>html_type</name>
-     <type>enum</type>
-     <values>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</values>
+     <type>varchar</type>
+     <length>32</length>
      <required>true</required>
      <comment>HTML types plus several built-in extended types.</comment>
      <add>1.1</add>
index 3e2319bb481912734f3211e740db170fb238c7f9..0318cb6555e3608c809756a7e861bcbbf89072f1 100644 (file)
@@ -67,8 +67,8 @@
 
   <field>
      <name>style</name>
-     <type>enum</type>
-     <values>Tab, Inline</values>
+     <type>varchar</type>
+     <length>8</length>
      <comment>Visual relationship between this form and its parent.</comment>
        <add>1.1</add>
        <html>
index 00ccaea284ca9e220b287986c95b7ae61c217144..632bb5c232d1c46ebf45d9d91e53c2573c5392b4 100644 (file)
@@ -20,8 +20,8 @@
   <field>
     <name>type</name>
     <title>Type</title>
-    <type>enum</type>
-    <values>payment, search, report, module, sms</values>
+    <type>varchar</type>
+    <length>8</length>
     <required>true</required>
     <comment></comment>
     <add>4.2</add>
index 13981356990bd77d47c5525720db2dfab0ebbc16..b86bdff9e80b5664c91a9a599e989096a0b59970 100644 (file)
@@ -33,8 +33,8 @@
   </foreignKey>
   <field>
        <name>run_frequency</name>
-       <type>enum</type>
-       <values>Hourly, Daily, Always</values>
+       <type>varchar</type>
+       <length>8</length>
        <default>"Daily"</default>
        <comment>Scheduled job run frequency.</comment>
        <add>4.1</add>