From: Julius Härtl Date: Wed, 9 Dec 2020 09:10:51 +0000 (+0100) Subject: Make sure the migrations table schema is always checked X-Git-Tag: v20.0.4~1^2~2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b84bdb1080beb8ece3badb97af2f2ed9e50956d7;p=nextcloud-server.git Make sure the migrations table schema is always checked Signed-off-by: Julius Härtl Revert "Make sure the migrations table schema is always checked" This reverts commit 258955ef738a52d9da2ac2fe59466e6093d7e9bc. Set current vendor during upgrade and perform migrations table change if needed Signed-off-by: Julius Härtl --- diff --git a/lib/private/DB/MigrationService.php b/lib/private/DB/MigrationService.php index cd0280162d3..33a11589eb4 100644 --- a/lib/private/DB/MigrationService.php +++ b/lib/private/DB/MigrationService.php @@ -124,6 +124,11 @@ class MigrationService { return false; } + if ($this->connection->tableExists('migrations') && \OC::$server->getConfig()->getAppValue('core', 'vendor', '') !== 'owncloud') { + $this->migrationTableCreated = true; + return false; + } + $schema = new SchemaWrapper($this->connection); /** diff --git a/lib/private/Updater.php b/lib/private/Updater.php index 2b5dce78057..3bf2cb1b6f9 100644 --- a/lib/private/Updater.php +++ b/lib/private/Updater.php @@ -197,6 +197,7 @@ class Updater extends BasicEmitter { isset($allowedPreviousVersions['owncloud'][$majorMinor]) )) { $currentVendor = 'owncloud'; + $this->config->setAppValue('core', 'vendor', $currentVendor); } if ($currentVendor === 'nextcloud') {