summaryrefslogtreecommitdiffstats
path: root/core/Command/Db/Migrations/StatusCommand.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/Command/Db/Migrations/StatusCommand.php')
-rw-r--r--core/Command/Db/Migrations/StatusCommand.php11
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;