From afb20966e3ef93a9ffffa3d4fbae5e762e1cdee0 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 'Cxn' --- CRM/Cxn/DAO/Cxn.php | 5 +++-- CRM/Upgrade/Incremental/php/FiveFortyNine/Cxn.bool.php | 6 ++++++ xml/schema/Cxn/Cxn.xml | 1 + 3 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 CRM/Upgrade/Incremental/php/FiveFortyNine/Cxn.bool.php diff --git a/CRM/Cxn/DAO/Cxn.php b/CRM/Cxn/DAO/Cxn.php index c347beef13..f63a7ac99d 100644 --- a/CRM/Cxn/DAO/Cxn.php +++ b/CRM/Cxn/DAO/Cxn.php @@ -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 index 0000000000..1a979d32b9 --- /dev/null +++ b/CRM/Upgrade/Incremental/php/FiveFortyNine/Cxn.bool.php @@ -0,0 +1,6 @@ + [ + 'is_active' => "DEFAULT 1 COMMENT 'Is connection currently enabled?'", + ], +]; diff --git a/xml/schema/Cxn/Cxn.xml b/xml/schema/Cxn/Cxn.xml index 979dbcdb04..0a19d3c000 100644 --- a/xml/schema/Cxn/Cxn.xml +++ b/xml/schema/Cxn/Cxn.xml @@ -95,6 +95,7 @@ Is Active boolean 1 + true Is connection currently enabled? 4.6 -- 2.25.1