Skip to content

Commit

Permalink
Ensure connection is closed before deleting sqlite file
Browse files Browse the repository at this point in the history
This should fix inability to drop sqlite DB on Windows OS
  • Loading branch information
ostrolucky committed Jul 24, 2023
1 parent 0e6b32b commit 2004001
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Command/DropDatabaseDoctrineCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 2004001

Please sign in to comment.