// 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();
+ if ($schema->isEnabled()) {
+ $schema->fixSchemaDifferences();
+ }
CRM_Core_Invoke::rebuildMenuAndCaches(FALSE, FALSE);
// sessionReset is FALSE because upgrade status/postUpgradeMessages are needed by the page. We reset later in doFinish().
foreach ($queries as $query) {
CRM_Core_DAO::executeQuery($query, [], TRUE, NULL, FALSE, FALSE);
}
+ $schema = new CRM_Logging_Schema();
+ if ($schema->isEnabled()) {
+ $schema->fixSchemaDifferencesFor($table);
+ }
}
if ($locales && $triggerRebuild) {
CRM_Core_I18n_Schema::rebuildMultilingualSchema($locales, $version, TRUE);
CRM_Core_DAO::executeQuery("ALTER TABLE `$table` DROP COLUMN `$column`",
[], TRUE, NULL, FALSE, FALSE);
}
+ $schema = new CRM_Logging_Schema();
+ if ($schema->isEnabled()) {
+ $schema->fixSchemaDifferencesFor($table);
+ }
return TRUE;
}
foreach ($queries as $query) {
CRM_Core_DAO::executeQuery($query, [], TRUE, NULL, FALSE, FALSE);
}
+ $schema = new CRM_Logging_Schema();
+ if ($schema->isEnabled()) {
+ $schema->fixSchemaDifferencesFor($table);
+ }
return TRUE;
}