From 369304089256d0edb0d5487f87c114d23ebf0c02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Mon, 1 Jun 2020 11:10:17 +0200 Subject: [PATCH] [2.x] CASCADE when deleting schemas --- src/TenantDatabaseManagers/PostgreSQLSchemaManager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TenantDatabaseManagers/PostgreSQLSchemaManager.php b/src/TenantDatabaseManagers/PostgreSQLSchemaManager.php index a93ed9018..1e25e32c8 100644 --- a/src/TenantDatabaseManagers/PostgreSQLSchemaManager.php +++ b/src/TenantDatabaseManagers/PostgreSQLSchemaManager.php @@ -37,7 +37,7 @@ public function createDatabase(string $name): bool public function deleteDatabase(string $name): bool { - return $this->database()->statement("DROP SCHEMA \"$name\""); + return $this->database()->statement("DROP SCHEMA \"$name\" CASCADE"); } public function databaseExists(string $name): bool