diff options
author | Robin Appelman <robin@icewind.nl> | 2018-04-12 17:47:40 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-05-30 21:28:05 +0200 |
commit | b40629ac8caf5d488053a9ab2e89210bf14e1b4c (patch) | |
tree | e4a5c79218778a494250768832d55640939c65ec /core/Command | |
parent | 2dd49206c74eaa8e9149b117775f4747483ba5bd (diff) | |
download | nextcloud-server-b40629ac8caf5d488053a9ab2e89210bf14e1b4c.tar.gz nextcloud-server-b40629ac8caf5d488053a9ab2e89210bf14e1b4c.zip |
Add human readable description to migration steps
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'core/Command')
-rw-r--r-- | core/Command/Db/Migrations/StatusCommand.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/core/Command/Db/Migrations/StatusCommand.php b/core/Command/Db/Migrations/StatusCommand.php index 1e5f102cea7..b548f109c48 100644 --- a/core/Command/Db/Migrations/StatusCommand.php +++ b/core/Command/Db/Migrations/StatusCommand.php @@ -58,7 +58,14 @@ class StatusCommand extends Command implements CompletionAwareInterface { $infos = $this->getMigrationsInfos($ms); foreach ($infos as $key => $value) { - $output->writeln(" <comment>>></comment> $key: " . str_repeat(' ', 50 - strlen($key)) . $value); + if (is_array($value)) { + $output->writeln(" <comment>>></comment> $key:"); + foreach ($value as $subKey => $subValue) { + $output->writeln(" <comment>>></comment> $subKey: " . str_repeat(' ', 46 - strlen($subKey)) . $subValue); + } + } else { + $output->writeln(" <comment>>></comment> $key: " . str_repeat(' ', 50 - strlen($key)) . $value); + } } } @@ -96,6 +103,7 @@ class StatusCommand extends Command implements CompletionAwareInterface { $numExecutedUnavailableMigrations = count($executedUnavailableMigrations); $numNewMigrations = count(array_diff(array_keys($availableMigrations), $executedMigrations)); + $pending = $ms->describeMigrationStep('lastest'); $infos = [ 'App' => $ms->getApp(), @@ -110,6 +118,7 @@ class StatusCommand extends Command implements CompletionAwareInterface { 'Executed Unavailable Migrations' => $numExecutedUnavailableMigrations, 'Available Migrations' => count($availableMigrations), 'New Migrations' => $numNewMigrations, + 'Pending Migrations' => count($pending) ? $pending : 'None' ]; return $infos; |