CiviGrant - Ensure dependencies are installed
authorColeman Watts <coleman@civicrm.org>
Thu, 3 Mar 2022 14:35:43 +0000 (09:35 -0500)
committerTim Otten <totten@civicrm.org>
Fri, 4 Mar 2022 01:56:29 +0000 (17:56 -0800)
Fixes dev/core#3093

CRM/Upgrade/Incremental/php/FiveFortySeven.php

index 08135fdf24ab730b6ec07b912742a543f8522e93..6ce55145ecccaaff9cd5fc97b4e03fdbd1b8fab9 100644 (file)
@@ -58,6 +58,9 @@ class CRM_Upgrade_Incremental_php_FiveFortySeven extends CRM_Upgrade_Incremental
   public function upgrade_5_47_alpha1($rev): void {
     $this->addTask(ts('Upgrade DB to %1: SQL', [1 => $rev]), 'runSql', $rev);
     $this->addTask('Migrate CiviGrant component to an extension', 'migrateCiviGrant');
+    if (CRM_Core_Component::isEnabled('CiviGrant')) {
+      $this->addExtensionTask('Enable CiviGrant dependencies', ['org.civicrm.search_kit', 'org.civicrm.afform']);
+    }
     $this->addTask('Add created_date to civicrm_relationship', 'addColumn', 'civicrm_relationship', 'created_date',
       "timestamp NOT NULL  DEFAULT CURRENT_TIMESTAMP COMMENT 'Relationship created date'"
     );