From 875849e2a80d37dc8bf5dd0663e464b6789e3b56 Mon Sep 17 00:00:00 2001 From: vytmic Date: Thu, 15 Oct 2015 10:45:43 +0300 Subject: [PATCH] fix "all migrated versions shown as unavailable executed" issue (partial revert of d81cf0dd13a2fd9a835d5639b0b64a85856edf1e) --- .../Migrations/Tools/Console/Command/StatusCommand.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/Doctrine/DBAL/Migrations/Tools/Console/Command/StatusCommand.php b/lib/Doctrine/DBAL/Migrations/Tools/Console/Command/StatusCommand.php index dab7cbb66f..447863392a 100644 --- a/lib/Doctrine/DBAL/Migrations/Tools/Console/Command/StatusCommand.php +++ b/lib/Doctrine/DBAL/Migrations/Tools/Console/Command/StatusCommand.php @@ -106,15 +106,17 @@ public function execute(InputInterface $input, OutputInterface $output) if ($input->getOption('show-versions')) { if ($migrations = $configuration->getMigrations()) { - $executedUnavailableMigrations = $migrations; $output->writeln("\n == Available Migration Versions\n"); $this->showVersions($migrations, $configuration, $output); } - if (!empty($executedUnavailableMigrations)) { + if ($numExecutedUnavailableMigrations) { $output->writeln("\n == Previously Executed Unavailable Migration Versions\n"); - $this->showVersions($executedUnavailableMigrations, $configuration, $output); + foreach ($executedUnavailableMigrations as $executedUnavailableMigration) { + $output->writeln(' >> ' . $configuration->formatVersion($executedUnavailableMigration) . + ' (' . $executedUnavailableMigration . ')'); + } } } }