Schema - Fix boolean fields in 'Cxn'
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/Cxn/DAO/Cxn.php
CRM/Upgrade/Incremental/php/FiveFortyNine/Cxn.bool.php [new file with mode: 0644]
xml/schema/Cxn/Cxn.xml

index c347beef13238a9c9b7e9cb354ca5714c80f142a..f63a7ac99d7dcdb3ce376d09006eb50344101f6d 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Generated from xml/schema/CRM/Cxn/Cxn.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:ef4c2d6fa99ceb5d3b6cc29e78d80e42)
+ * (GenCodeChecksum:c08750593de1e3fd08e6a9899b555cde)
  */
 
 /**
@@ -96,7 +96,7 @@ class CRM_Cxn_DAO_Cxn extends CRM_Core_DAO {
   /**
    * Is connection currently enabled?
    *
-   * @var bool|string|null
+   * @var bool|string
    *   (SQL type: tinyint)
    *   Note that values will be retrieved from the database as a string.
    */
@@ -263,6 +263,7 @@ class CRM_Cxn_DAO_Cxn extends CRM_Core_DAO {
           'type' => CRM_Utils_Type::T_BOOLEAN,
           'title' => ts('Is Active'),
           'description' => ts('Is connection currently enabled?'),
+          'required' => TRUE,
           'where' => 'civicrm_cxn.is_active',
           'default' => '1',
           'table_name' => 'civicrm_cxn',
diff --git a/CRM/Upgrade/Incremental/php/FiveFortyNine/Cxn.bool.php b/CRM/Upgrade/Incremental/php/FiveFortyNine/Cxn.bool.php
new file mode 100644 (file)
index 0000000..1a979d3
--- /dev/null
@@ -0,0 +1,6 @@
+<?php
+return [
+  'civicrm_cxn' => [
+    'is_active' => "DEFAULT 1 COMMENT 'Is connection currently enabled?'",
+  ],
+];
index 979dbcdb0492268c31d8f8e9c5b1f8573ef11cd7..0a19d3c000ff3a3c42f18bc2088d07c35cfa0c35 100644 (file)
@@ -95,6 +95,7 @@
     <title>Is Active</title>
     <type>boolean</type>
     <default>1</default>
+    <required>true</required>
     <comment>Is connection currently enabled?</comment>
     <add>4.6</add>
   </field>