diff --git a/CRM/Core/DAO/OptionValue.php b/CRM/Core/DAO/OptionValue.php index 279f18540ea572fc26463fd8b27dfc3b67801183..c2418be597769541da34b196f800477ac193c243 100644 --- a/CRM/Core/DAO/OptionValue.php +++ b/CRM/Core/DAO/OptionValue.php @@ -6,7 +6,7 @@ * * Generated from xml/schema/CRM/Core/OptionValue.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:7aa11987c26800632c3798b4cfce95c1) + * (GenCodeChecksum:5997192c77d86867e8d13c353dd02351) */ /** @@ -281,7 +281,7 @@ class CRM_Core_DAO_OptionValue extends CRM_Core_DAO { 'title' => ts('Filter'), 'description' => ts('Bitwise logic can be used to create subsets of options within an option_group for different uses.'), 'where' => 'civicrm_option_value.filter', - 'default' => 'NULL', + 'default' => '0', 'table_name' => 'civicrm_option_value', 'entity' => 'OptionValue', 'bao' => 'CRM_Core_BAO_OptionValue', diff --git a/CRM/Upgrade/Incremental/sql/5.27.beta1.mysql.tpl b/CRM/Upgrade/Incremental/sql/5.27.beta1.mysql.tpl index 975881c87d2c949cfe52a3a08c2b202d35963db3..699d61878c7bcc8fe8010053b0a0db2bad72423c 100644 --- a/CRM/Upgrade/Incremental/sql/5.27.beta1.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/5.27.beta1.mysql.tpl @@ -1 +1,8 @@ {* file to handle db changes in 5.27.beta1 during upgrade *} +ALTER TABLE civicrm_option_value MODIFY COLUMN `filter` int unsigned DEFAULT 0 COMMENT 'Bitwise logic can be used to create subsets of options within an option_group for different uses.'; + +-- To think about: This will update ones where someone has explicitly set it to NULL for their own purposes and they don't care about the dropdowns. How likely is that? How can we tell if it's one they created since 5.26 and didn't intend to set it to NULL? +UPDATE civicrm_option_value ov +INNER JOIN civicrm_option_group og ON (ov.option_group_id = og.id AND og.name='activity_type') +SET ov.filter = 0 +WHERE ov.filter IS NULL; diff --git a/xml/schema/Core/OptionValue.xml b/xml/schema/Core/OptionValue.xml index f3a767d0645a445a4f519db3fddac5b60fc69734..ce81cc6822a5908685ff55cd5a9996b4816d5c6a 100644 --- a/xml/schema/Core/OptionValue.xml +++ b/xml/schema/Core/OptionValue.xml @@ -82,7 +82,7 @@ <field> <name>filter</name> <type>int unsigned</type> - <default>NULL</default> + <default>0</default> <comment>Bitwise logic can be used to create subsets of options within an option_group for different uses.</comment> <add>1.5</add> </field>