Skip to content

Commit

Permalink
[11.x] Fix: Apply database connection before checking if the reposito…
Browse files Browse the repository at this point in the history
…ry exist (#51021)

* Fix: Apply database connection  before checking if the repository exist

* Fix Style CI Failure
  • Loading branch information
sjspereira authored Apr 11, 2024
1 parent 7a079c9 commit dec31b0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Illuminate/Database/Console/Migrations/FreshCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ public function handle()

$database = $this->input->getOption('database');

if (! is_null($database)) {
$this->migrator->setConnection($database);
}

if ($this->migrator->repositoryExists()) {
$this->newLine();

Expand Down

0 comments on commit dec31b0

Please sign in to comment.