From b599132667693a9d9498015d7d9cca1656c9fdc6 Mon Sep 17 00:00:00 2001 From: Monish Deb Date: Thu, 7 Apr 2022 18:12:16 -0700 Subject: [PATCH] Schema - Fix boolean fields in 'Dedupe' --- CRM/Dedupe/DAO/DedupeRuleGroup.php | 6 ++++-- CRM/Upgrade/Incremental/php/FiveFortyNine/Dedupe.bool.php | 6 ++++++ xml/schema/Dedupe/DedupeRuleGroup.xml | 2 ++ 3 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 CRM/Upgrade/Incremental/php/FiveFortyNine/Dedupe.bool.php diff --git a/CRM/Dedupe/DAO/DedupeRuleGroup.php b/CRM/Dedupe/DAO/DedupeRuleGroup.php index 434f259678..9c7e1cffb8 100644 --- a/CRM/Dedupe/DAO/DedupeRuleGroup.php +++ b/CRM/Dedupe/DAO/DedupeRuleGroup.php @@ -6,7 +6,7 @@ * * Generated from xml/schema/CRM/Dedupe/DedupeRuleGroup.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:66687eeebbe44a6fca675162a59edaa0) + * (GenCodeChecksum:9390f709bdbf2945acb57c353814e393) */ /** @@ -87,7 +87,7 @@ class CRM_Dedupe_DAO_DedupeRuleGroup extends CRM_Core_DAO { /** * Is this a reserved rule - a rule group that has been optimized and cannot be changed by the admin * - * @var bool|string|null + * @var bool|string * (SQL type: tinyint) * Note that values will be retrieved from the database as a string. */ @@ -232,7 +232,9 @@ class CRM_Dedupe_DAO_DedupeRuleGroup extends CRM_Core_DAO { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Reserved?'), 'description' => ts('Is this a reserved rule - a rule group that has been optimized and cannot be changed by the admin'), + 'required' => TRUE, 'where' => 'civicrm_dedupe_rule_group.is_reserved', + 'default' => '0', 'table_name' => 'civicrm_dedupe_rule_group', 'entity' => 'DedupeRuleGroup', 'bao' => 'CRM_Dedupe_BAO_DedupeRuleGroup', diff --git a/CRM/Upgrade/Incremental/php/FiveFortyNine/Dedupe.bool.php b/CRM/Upgrade/Incremental/php/FiveFortyNine/Dedupe.bool.php new file mode 100644 index 0000000000..46db00459f --- /dev/null +++ b/CRM/Upgrade/Incremental/php/FiveFortyNine/Dedupe.bool.php @@ -0,0 +1,6 @@ + [ + 'is_reserved' => "DEFAULT 0 COMMENT 'Is this a reserved rule - a rule group that has been optimized and cannot be changed by the admin'", + ], +]; diff --git a/xml/schema/Dedupe/DedupeRuleGroup.xml b/xml/schema/Dedupe/DedupeRuleGroup.xml index 1a8722da33..ff77740d4c 100644 --- a/xml/schema/Dedupe/DedupeRuleGroup.xml +++ b/xml/schema/Dedupe/DedupeRuleGroup.xml @@ -87,6 +87,8 @@ Reserved? boolean Is this a reserved rule - a rule group that has been optimized and cannot be changed by the admin + 0 + true 4.1 CheckBox -- 2.25.1