dev/core#1697 set is_deceased to not null in schema and upgrade script
authorMichael McAndrew <michael@3sd.io>
Wed, 8 Apr 2020 09:40:14 +0000 (10:40 +0100)
committerColeman Watts <coleman@civicrm.org>
Thu, 9 Apr 2020 12:58:53 +0000 (08:58 -0400)
CRM/Contact/DAO/Contact.php
CRM/Upgrade/Incremental/sql/5.26.alpha1.mysql.tpl
xml/schema/Contact/Contact.xml

index e4135fe7e2a0f90c55391201fa5dbb8109b1e310..7acdddd04c42b2137073755e4b1e7eedc8c49740 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Generated from xml/schema/CRM/Contact/Contact.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:4b1e2ef9f5c431f59befcc000cb35577)
+ * (GenCodeChecksum:e811ca59eee757951e6e190a318f9749)
  */
 
 /**
@@ -1204,6 +1204,7 @@ class CRM_Contact_DAO_Contact extends CRM_Core_DAO {
           'name' => 'is_deceased',
           'type' => CRM_Utils_Type::T_BOOLEAN,
           'title' => ts('Deceased'),
+          'required' => TRUE,
           'import' => TRUE,
           'where' => 'civicrm_contact.is_deceased',
           'headerPattern' => '/i(s\s)?d(eceased)$/i',
index d0cf4564fd9f4a3c34960d2e0900ffa5fa2fa15e..c0277ba54fdeecd0f3893c2163018e52a4c709ad 100644 (file)
@@ -1 +1,4 @@
 {* file to handle db changes in 5.26.alpha1 during upgrade *}
+
+UPDATE civicrm_contact SET is_deceased = 0 WHERE is_deceased IS NULL;
+ALTER TABLE civicrm_contact MODIFY COLUMN is_deceased TINYINT NOT NULL DEFAULT 0;
index 28a2ee98f704bfa65ebffa823a49a8933ac5494a..036ad4edd3cbc6a6c51631cfec10d18559757535 100644 (file)
     <type>boolean</type>
     <default>0</default>
     <add>1.1</add>
+    <required>true</required>
     <html>
       <type>CheckBox</type>
     </html>