From 1557b88ed5907a1f2626410fcc08e71863c715ec Mon Sep 17 00:00:00 2001 From: Joao Gilberto Magalhaes Date: Mon, 6 Jan 2025 19:34:22 -0600 Subject: [PATCH] Force read all table before drop the database. --- src/Database/SqliteDatabase.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Database/SqliteDatabase.php b/src/Database/SqliteDatabase.php index 82a0f0f..1979e45 100644 --- a/src/Database/SqliteDatabase.php +++ b/src/Database/SqliteDatabase.php @@ -38,8 +38,10 @@ public function dropDatabase(): void END; "); - foreach ($iterator as $row) { - $this->getDbDriver()->execute($row->get('command')); + $list = $iterator->toArray(); + + foreach ($list as $row) { + $this->getDbDriver()->execute($row['command']); } }