Skip to content
Snippets Groups Projects
Unverified Commit 18d85d46 authored by John Molakvoæ's avatar John Molakvoæ Committed by GitHub
Browse files

Merge pull request #15783 from nextcloud/bugfix/6015/app-enable-migration

Run repair steps when enabling an app that has already been installed
parents dc600f26 8f2e8fa3
No related branches found
No related tags found
No related merge requests found
......@@ -129,6 +129,11 @@ class Installer {
\OC_App::checkAppDependencies($this->config, $l, $info, $ignoreMax);
\OC_App::registerAutoloading($appId, $basedir);
$previousVersion = $this->config->getAppValue($info['id'], 'installed_version', false);
if ($previousVersion) {
OC_App::executeRepairSteps($appId, $info['repair-steps']['pre-migration']);
}
//install the database
if(is_file($basedir.'/appinfo/database.xml')) {
if (\OC::$server->getConfig()->getAppValue($info['id'], 'installed_version') === null) {
......@@ -140,6 +145,9 @@ class Installer {
$ms = new \OC\DB\MigrationService($info['id'], \OC::$server->getDatabaseConnection());
$ms->migrate();
}
if ($previousVersion) {
OC_App::executeRepairSteps($appId, $info['repair-steps']['post-migration']);
}
\OC_App::setupBackgroundJobs($info['background-jobs']);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment