From 2004001677d125386b5f410534b7809a4a4f0f60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Ostroluck=C3=BD?= Date: Fri, 21 Jul 2023 04:14:36 +0200 Subject: [PATCH] Ensure connection is closed before deleting sqlite file This should fix inability to drop sqlite DB on Windows OS --- Command/DropDatabaseDoctrineCommand.php | 1 + 1 file changed, 1 insertion(+) diff --git a/Command/DropDatabaseDoctrineCommand.php b/Command/DropDatabaseDoctrineCommand.php index 4ed7e20aa..93945bdc2 100644 --- a/Command/DropDatabaseDoctrineCommand.php +++ b/Command/DropDatabaseDoctrineCommand.php @@ -104,6 +104,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int if ($shouldDropDatabase) { if ($schemaManager instanceof SqliteSchemaManager) { // dropDatabase() is deprecated for Sqlite + $connection->close(); if (file_exists($name)) { unlink($name); }