From bd35462ed7fd09be02304f0d89dd5ab25c5a512f Mon Sep 17 00:00:00 2001 From: Gonzalo Date: Sat, 17 Oct 2015 23:29:26 -0300 Subject: [PATCH 1/2] Fix for migration rollback command --- src/Console/RollbackCommand.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Console/RollbackCommand.php b/src/Console/RollbackCommand.php index 65fdbc1..0a0c483 100644 --- a/src/Console/RollbackCommand.php +++ b/src/Console/RollbackCommand.php @@ -14,7 +14,8 @@ class RollbackCommand extends Command * The name and signature of the console command. * @var string */ - protected $signature = 'doctrine:migrations:rollback [version=] + protected $signature = 'doctrine:migrations:rollback + {--migration-version= : For a specific migration version.} {--connection= : For a specific connection.}'; /** @@ -33,10 +34,11 @@ public function fire(ConfigurationProvider $provider) $this->option('connection') ); - $version = $this->argument('version') ?: $configuration->getCurrentVersion(); + $version = $this->option('migration-version') ?: $configuration->getCurrentVersion(); if ($version == 0) { - return $this->error('No migrations to be rollbacked'); + $this->error('No migrations to be rollbacked'); + return; } $this->call('doctrine:migrations:execute', [ From 79e32be878ddc638e8383336af99922173427d12 Mon Sep 17 00:00:00 2001 From: Gonzalo Date: Sat, 17 Oct 2015 23:55:33 -0300 Subject: [PATCH 2/2] Fix style --- src/Console/RollbackCommand.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Console/RollbackCommand.php b/src/Console/RollbackCommand.php index 0a0c483..bd4e326 100644 --- a/src/Console/RollbackCommand.php +++ b/src/Console/RollbackCommand.php @@ -38,6 +38,7 @@ public function fire(ConfigurationProvider $provider) if ($version == 0) { $this->error('No migrations to be rollbacked'); + return; }