diff options
Diffstat (limited to 'core/Command/Db/Migrations')
-rw-r--r-- | core/Command/Db/Migrations/ExecuteCommand.php | 1 | ||||
-rw-r--r-- | core/Command/Db/Migrations/GenerateCommand.php | 9 | ||||
-rw-r--r-- | core/Command/Db/Migrations/GenerateMetadataCommand.php | 6 |
3 files changed, 9 insertions, 7 deletions
diff --git a/core/Command/Db/Migrations/ExecuteCommand.php b/core/Command/Db/Migrations/ExecuteCommand.php index cb6edd7c78c..a89072c1ad1 100644 --- a/core/Command/Db/Migrations/ExecuteCommand.php +++ b/core/Command/Db/Migrations/ExecuteCommand.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2017 ownCloud GmbH diff --git a/core/Command/Db/Migrations/GenerateCommand.php b/core/Command/Db/Migrations/GenerateCommand.php index ed29412f00b..a75280fa8b1 100644 --- a/core/Command/Db/Migrations/GenerateCommand.php +++ b/core/Command/Db/Migrations/GenerateCommand.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2017 ownCloud GmbH @@ -22,8 +23,8 @@ use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Question\ConfirmationQuestion; class GenerateCommand extends Command implements CompletionAwareInterface { - protected static $_templateSimple = - '<?php + protected static $_templateSimple + = '<?php declare(strict_types=1); @@ -38,6 +39,7 @@ use Closure; use OCP\DB\ISchemaWrapper; use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; +use Override; /** * FIXME Auto-generated migration step: Please modify to your needs! @@ -49,6 +51,7 @@ class {{classname}} extends SimpleMigrationStep { * @param Closure(): ISchemaWrapper $schemaClosure * @param array $options */ + #[Override] public function preSchemaChange(IOutput $output, Closure $schemaClosure, array $options): void { } @@ -58,6 +61,7 @@ class {{classname}} extends SimpleMigrationStep { * @param array $options * @return null|ISchemaWrapper */ + #[Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { {{schemabody}} } @@ -67,6 +71,7 @@ class {{classname}} extends SimpleMigrationStep { * @param Closure(): ISchemaWrapper $schemaClosure * @param array $options */ + #[Override] public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options): void { } } diff --git a/core/Command/Db/Migrations/GenerateMetadataCommand.php b/core/Command/Db/Migrations/GenerateMetadataCommand.php index ae83f92b29e..581259c99df 100644 --- a/core/Command/Db/Migrations/GenerateMetadataCommand.php +++ b/core/Command/Db/Migrations/GenerateMetadataCommand.php @@ -68,15 +68,11 @@ class GenerateMetadataCommand extends Command { $metadata = []; foreach ($allApps as $appId) { // We need to load app before being able to extract Migrations - // If app was not enabled before, we will disable it afterward. - $alreadyLoaded = $this->appManager->isInstalled($appId); + $alreadyLoaded = $this->appManager->isAppLoaded($appId); if (!$alreadyLoaded) { $this->appManager->loadApp($appId); } $metadata[$appId] = $this->metadataManager->extractMigrationAttributes($appId); - if (!$alreadyLoaded) { - $this->appManager->disableApp($appId); - } } return $metadata; } |