Skip to content

Commit

Permalink
fixup Add enable extension as a reusable upgrade task
Browse files Browse the repository at this point in the history
  • Loading branch information
totten committed Mar 4, 2022
1 parent 5d05cd5 commit 72a5313
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion CRM/Upgrade/Incremental/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,13 @@ public static function enableExtension(CRM_Queue_TaskContext $ctx, array $keys):

$manager = CRM_Extension_System::singleton()->getManager();
$manager->enable($manager->findInstallRequirements($keys));
CRM_Core_Invoke::rebuildMenuAndCaches(TRUE, TRUE);

// Hrm, `enable()` normally does these things... but not during upgrade...
// Note: A good test-scenario is to install 5.45; enable logging and CiviGrant; disable searchkit+afform; then upgrade to 5.47.
$schema = new CRM_Logging_Schema();
$schema->fixSchemaDifferences();
CRM_Core_Invoke::rebuildMenuAndCaches(FALSE, TRUE);

return TRUE;
}

Expand Down

0 comments on commit 72a5313

Please sign in to comment.