Skip to content

Commit dec31b0

Browse files
authored
[11.x] Fix: Apply database connection before checking if the repository exist (#51021)
* Fix: Apply database connection before checking if the repository exist * Fix Style CI Failure
1 parent 7a079c9 commit dec31b0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Illuminate/Database/Console/Migrations/FreshCommand.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ public function handle()
6262

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

65+
if (! is_null($database)) {
66+
$this->migrator->setConnection($database);
67+
}
68+
6569
if ($this->migrator->repositoryExists()) {
6670
$this->newLine();
6771

0 commit comments

Comments
 (0)