Skip to content

Commit

Permalink
migrate:status can be ran with another connection (#15824)
Browse files Browse the repository at this point in the history
Bug was, if I tried to run the command with an sqlite connection, and
that I didn't have mysql installed, it didn't work.
  • Loading branch information
ElMatella authored and taylorotwell committed Oct 8, 2016
1 parent b857da2 commit e74af1c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Illuminate/Database/Console/Migrations/StatusCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ public function __construct(Migrator $migrator)
*/
public function fire()
{
$this->migrator->setConnection($this->option('database'));

if (! $this->migrator->repositoryExists()) {
return $this->error('No migrations found.');
}

$this->migrator->setConnection($this->option('database'));

$ran = $this->migrator->getRepository()->getRan();

$migrations = Collection::make($this->getAllMigrationFiles())
Expand Down

0 comments on commit e74af1c

Please sign in to comment.