From dac028f8096bde9ecf94458cf9c21ed69c107974 Mon Sep 17 00:00:00 2001 From: "John Paul E. Balandan, CPA" Date: Wed, 15 Nov 2023 18:07:08 +0800 Subject: [PATCH] Add fix --- system/Database/MigrationRunner.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/system/Database/MigrationRunner.php b/system/Database/MigrationRunner.php index 241a9e6da5fa..6719cbec4549 100644 --- a/system/Database/MigrationRunner.php +++ b/system/Database/MigrationRunner.php @@ -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') {