FiveFortySeven - Ensure that `civicrm_search_display` is up-to-date
authorTim Otten <totten@civicrm.org>
Fri, 4 Mar 2022 04:37:43 +0000 (20:37 -0800)
committerTim Otten <totten@civicrm.org>
Fri, 4 Mar 2022 04:59:16 +0000 (20:59 -0800)
Note: This step was added to the codebase circa 5.47. The underlying schema
change actually originated circa 5.46. The step should be idempotent.

CRM/Upgrade/Incremental/php/FiveFortySeven.php

index 4626507168890474ebfd0e002a98484a3a2c242c..4cc9616442e931913d67b84ebca55cf696f60a11 100644 (file)
@@ -75,6 +75,12 @@ class CRM_Upgrade_Incremental_php_FiveFortySeven extends CRM_Upgrade_Incremental
     $this->addTask('core-issue#2122 - Set the timezone to the default for existing Events', 'setEventTZDefault');
     $this->addTask('Drop CustomGroup UI_name_extends index', 'dropIndex', 'civicrm_custom_group', 'UI_name_extends');
     $this->addTask('Add CustomGroup UI_name index', 'addIndex', 'civicrm_custom_group', ['name'], 'UI');
+    if (CRM_Core_DAO::checkTableExists('civicrm_search_display')) {
+      $this->addTask('Add SearchDisplay.acl_bypass', 'addColumn',
+        'civicrm_search_display', 'acl_bypass',
+        "tinyint DEFAULT 0 COMMENT 'Skip permission checks and ACLs when running this display.'"
+      );
+    }
   }
 
   /**