Schema - Fix boolean fields in 'Dedupe'
authorMonish Deb <monish.deb@jmaconsulting.biz>
Fri, 8 Apr 2022 01:12:16 +0000 (18:12 -0700)
committerTim Otten <totten@civicrm.org>
Fri, 8 Apr 2022 01:12:16 +0000 (18:12 -0700)
CRM/Dedupe/DAO/DedupeRuleGroup.php
CRM/Upgrade/Incremental/php/FiveFortyNine/Dedupe.bool.php [new file with mode: 0644]
xml/schema/Dedupe/DedupeRuleGroup.xml

index 434f259678da1669e4c707207e2b8603bbc93d93..9c7e1cffb8600d5d1089fd60055377bd00ba5498 100644 (file)
@@ -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 (file)
index 0000000..46db004
--- /dev/null
@@ -0,0 +1,6 @@
+<?php
+return [
+  'civicrm_dedupe_rule_group' => [
+    'is_reserved' => "DEFAULT 0 COMMENT 'Is this a reserved rule - a rule group that has been optimized and cannot be changed by the admin'",
+  ],
+];
index 1a8722da3334a8b255f4a62418cd10dae638fd0f..ff77740d4ccc60f1049c60b6fa7e06b34983bee9 100644 (file)
@@ -87,6 +87,8 @@
     <title>Reserved?</title>
     <type>boolean</type>
     <comment>Is this a reserved rule - a rule group that has been optimized and cannot be changed by the admin</comment>
+    <default>0</default>
+    <required>true</required>
     <add>4.1</add>
     <html>
       <type>CheckBox</type>