Skip to content

Commit

Permalink
Add fix
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbalandan committed Nov 16, 2023
1 parent 48c5948 commit a7a6777
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion system/Database/MigrationRunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,8 @@ protected function migrate($direction, $migration): bool
throw new RuntimeException($message);
}

$instance = new $class();
/** @var Migration $instance */
$instance = new $class(Database::forge($this->db));
$group = $instance->getDBGroup() ?? config(Database::class)->defaultGroup;

if (ENVIRONMENT !== 'testing' && $group === 'tests' && $this->groupFilter !== 'tests') {
Expand Down

0 comments on commit a7a6777

Please sign in to comment.