mirror of
https://github.com/nextcloud/server.git
synced 2026-04-28 17:48:40 -04:00
Merge pull request #29780 from nextcloud/bugfix/noid/run-migrations-fuly-on-reenabling
Run migrations fully when reenabling an app
This commit is contained in:
commit
8dd65ebd05
1 changed files with 5 additions and 4 deletions
|
|
@ -151,7 +151,7 @@ class Installer {
|
|||
|
||||
//install the database
|
||||
$ms = new MigrationService($info['id'], \OC::$server->get(Connection::class));
|
||||
$ms->migrate('latest', true);
|
||||
$ms->migrate('latest', !$previousVersion);
|
||||
|
||||
if ($previousVersion) {
|
||||
OC_App::executeRepairSteps($appId, $info['repair-steps']['post-migration']);
|
||||
|
|
@ -597,8 +597,11 @@ class Installer {
|
|||
$appPath = OC_App::getAppPath($app);
|
||||
\OC_App::registerAutoloading($app, $appPath);
|
||||
|
||||
$config = \OC::$server->getConfig();
|
||||
|
||||
$ms = new MigrationService($app, \OC::$server->get(Connection::class));
|
||||
$ms->migrate('latest', true);
|
||||
$previousVersion = $config->getAppValue($app, 'installed_version', false);
|
||||
$ms->migrate('latest', !$previousVersion);
|
||||
|
||||
//run appinfo/install.php
|
||||
self::includeAppScript("$appPath/appinfo/install.php");
|
||||
|
|
@ -611,8 +614,6 @@ class Installer {
|
|||
|
||||
OC_App::executeRepairSteps($app, $info['repair-steps']['install']);
|
||||
|
||||
$config = \OC::$server->getConfig();
|
||||
|
||||
$config->setAppValue($app, 'installed_version', OC_App::getAppVersion($app));
|
||||
if (array_key_exists('ocsid', $info)) {
|
||||
$config->setAppValue($app, 'ocsid', $info['ocsid']);
|
||||
|
|
|
|||
Loading…
Reference in a new issue