aboutsummaryrefslogtreecommitdiffstats
path: root/core/Command
diff options
context:
space:
mode:
authorMaxence Lange <maxence@artificial-owl.com>2024-08-06 22:22:38 -0100
committerMaxence Lange <maxence@artificial-owl.com>2024-08-06 22:23:12 -0100
commit6ad6fa64258491fb35f9306c04ca2740bb4f6040 (patch)
tree4a223766f09cdb6ca51c18135d36fc8761194a82 /core/Command
parent3419edd697cbc81b814c60f820355b85b0ee2c05 (diff)
downloadnextcloud-server-6ad6fa64258491fb35f9306c04ca2740bb4f6040.tar.gz
nextcloud-server-6ad6fa64258491fb35f9306c04ca2740bb4f6040.zip
fix(migration-preview): display a message if no attributes set
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Diffstat (limited to 'core/Command')
-rw-r--r--core/Command/Db/Migrations/PreviewCommand.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/core/Command/Db/Migrations/PreviewCommand.php b/core/Command/Db/Migrations/PreviewCommand.php
index e35100dacb2..5a0e766ee6d 100644
--- a/core/Command/Db/Migrations/PreviewCommand.php
+++ b/core/Command/Db/Migrations/PreviewCommand.php
@@ -62,6 +62,12 @@ class PreviewCommand extends Command {
}
$table->render();
+ $unsupportedApps = $this->metadataManager->getUnsupportedApps($metadata['migrations']);
+ if (!empty($unsupportedApps)) {
+ $output->writeln('');
+ $output->writeln('Those apps are not supporting metadata yet and might initiate migrations on upgrade: <info>' . implode(', ', $unsupportedApps) . '</info>');
+ }
+
return 0;
}
@@ -90,6 +96,9 @@ class PreviewCommand extends Command {
/** @var MigrationAttribute[] $attributes */
foreach($data as $migration => $attributes) {
$attributesStr = [];
+ if (empty($attributes)) {
+ $attributesStr[] = '<comment>(metadata not set)</comment>';
+ }
foreach($attributes as $attribute) {
$definition = '<info>' . $attribute->definition() . "</info>";
$definition .= empty($attribute->getDescription()) ? '' : "\n " . $attribute->getDescription();