mirror of
https://github.com/nextcloud/server.git
synced 2026-06-08 16:26:59 -04:00
Merge pull request #30488 from nextcloud/backport/29780/stable21
This commit is contained in:
commit
cf46808a7f
1 changed files with 5 additions and 4 deletions
|
|
@ -159,7 +159,7 @@ class Installer {
|
|||
}
|
||||
} else {
|
||||
$ms = new \OC\DB\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']);
|
||||
|
|
@ -606,6 +606,8 @@ class Installer {
|
|||
$appPath = OC_App::getAppPath($app);
|
||||
\OC_App::registerAutoloading($app, $appPath);
|
||||
|
||||
$config = \OC::$server->getConfig();
|
||||
|
||||
if (is_file("$appPath/appinfo/database.xml")) {
|
||||
try {
|
||||
OC_DB::createDbFromStructure("$appPath/appinfo/database.xml");
|
||||
|
|
@ -617,8 +619,9 @@ class Installer {
|
|||
);
|
||||
}
|
||||
} else {
|
||||
$previousVersion = $config->getAppValue($app, 'installed_version', false);
|
||||
$ms = new \OC\DB\MigrationService($app, \OC::$server->get(Connection::class));
|
||||
$ms->migrate('latest', true);
|
||||
$ms->migrate('latest', !$previousVersion);
|
||||
}
|
||||
|
||||
//run appinfo/install.php
|
||||
|
|
@ -632,8 +635,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