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

index c99c67b975910ae1fd58fef526c3846e3a03c1d1..5d03b57ff5d4a5baa08a9439cba79dd216a6c15c 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Generated from xml/schema/CRM/ACL/ACLEntityRole.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:22633176232bcef28b59ab0388720837)
+ * (GenCodeChecksum:9c4c402f2b82415b38365ed3293e0b26)
  */
 
 /**
@@ -69,7 +69,7 @@ class CRM_ACL_DAO_ACLEntityRole extends CRM_Core_DAO {
   /**
    * Is this property active?
    *
-   * @var bool|string|null
+   * @var bool|string
    *   (SQL type: tinyint)
    *   Note that values will be retrieved from the database as a string.
    */
@@ -186,7 +186,9 @@ class CRM_ACL_DAO_ACLEntityRole extends CRM_Core_DAO {
           'type' => CRM_Utils_Type::T_BOOLEAN,
           'title' => ts('ACL Entity Role is Active'),
           'description' => ts('Is this property active?'),
+          'required' => TRUE,
           'where' => 'civicrm_acl_entity_role.is_active',
+          'default' => '0',
           'table_name' => 'civicrm_acl_entity_role',
           'entity' => 'ACLEntityRole',
           'bao' => 'CRM_ACL_BAO_ACLEntityRole',
diff --git a/CRM/Upgrade/Incremental/php/FiveFortyNine/ACL.bool.php b/CRM/Upgrade/Incremental/php/FiveFortyNine/ACL.bool.php
new file mode 100644 (file)
index 0000000..bfabe0b
--- /dev/null
@@ -0,0 +1,4 @@
+<?php
+return [
+  // DAO changed, but nothing in upgrader?
+];
index f2648d445d634ad4d48a7a0d3b89daf2ebb2f8ac..d4bab2912e23b7ab8f5d670988fe630526461d57 100644 (file)
@@ -62,6 +62,8 @@
     <title>ACL Entity Role is Active</title>
     <type>boolean</type>
     <comment>Is this property active?</comment>
+    <default>0</default>
+    <required>true</required>
     <add>1.6</add>
   </field>
   <index>