Add is_active to status pref
authoreileen <emcnaughton@wikimedia.org>
Sun, 6 Oct 2019 16:21:52 +0000 (18:21 +0200)
committereileen <emcnaughton@wikimedia.org>
Sun, 6 Oct 2019 17:19:53 +0000 (19:19 +0200)
CRM/Core/DAO/StatusPreference.php
CRM/Upgrade/Incremental/php/FiveNineteen.php
xml/schema/Core/StatusPreference.xml

index 3e2bf54ec09cf4e9452b99b01a2ba22eb5d30b73..1cbbc9218710a62992ffc300e1c780e1a34e8495 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Generated from xml/schema/CRM/Core/StatusPreference.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:bb8e5ce5e19462083928dc256fe1ebf2)
+ * (GenCodeChecksum:ce861431549af8024fdbfe418607202f)
  */
 
 /**
@@ -77,6 +77,13 @@ class CRM_Core_DAO_StatusPreference extends CRM_Core_DAO {
    */
   public $check_info;
 
+  /**
+   * Is this status check active?
+   *
+   * @var bool
+   */
+  public $is_active;
+
   /**
    * Class constructor.
    */
@@ -211,6 +218,18 @@ class CRM_Core_DAO_StatusPreference extends CRM_Core_DAO {
           'bao' => 'CRM_Core_BAO_StatusPreference',
           'localizable' => 0,
         ],
+        'is_active' => [
+          'name' => 'is_active',
+          'type' => CRM_Utils_Type::T_BOOLEAN,
+          'title' => ts('Check Is Active'),
+          'description' => ts('Is this status check active?'),
+          'where' => 'civicrm_status_pref.is_active',
+          'default' => '1',
+          'table_name' => 'civicrm_status_pref',
+          'entity' => 'StatusPreference',
+          'bao' => 'CRM_Core_BAO_StatusPreference',
+          'localizable' => 0,
+        ],
       ];
       CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
     }
index 588f70106a44440c4393e4549e98d705c33307dd..09ca6201ce6769af8fafd846e56ba8d720abf652 100644 (file)
@@ -69,6 +69,8 @@ class CRM_Upgrade_Incremental_php_FiveNineteen extends CRM_Upgrade_Incremental_B
   public function upgrade_5_19_alpha1($rev) {
     $this->addTask(ts('Upgrade DB to %1: SQL', [1 => $rev]), 'runSql', $rev);
     $this->addTask('Add api4 menu', 'api4Menu');
+    $this->addTask('Add is_active field to civicrm_status_pref', 'addColumn', 'civicrm_status_pref', 'is_active',
+      "tinyint(4) DEFAULT '1' COMMENT 'Is this status check active'", TRUE, '5.19.0');
   }
 
   /**
index 7e924e641a3047797348cb37d6f001005c062651..7ae28e74bdbd27397d754e23fc6a93d5b7bbe02f 100644 (file)
     <comment>These values are per-check, and can't be compared across checks.</comment>
     <add>4.7</add>
   </field>
+  <field>
+    <name>is_active</name>
+    <title>Check Is Active</title>
+    <type>boolean</type>
+    <default>1</default>
+    <comment>Is this status check active?</comment>
+    <add>5.19</add>
+  </field>
 </table>