From df99e3e7116265ba8540111ccbbef08f122bbab1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Tue, 24 Mar 2020 15:02:23 +0100 Subject: [PATCH] Check that the tenant database can be created only if it should be created --- src/TenantManager.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/TenantManager.php b/src/TenantManager.php index e80bf656..9cd2b2ff 100644 --- a/src/TenantManager.php +++ b/src/TenantManager.php @@ -145,8 +145,11 @@ class TenantManager */ public function ensureTenantCanBeCreated(Tenant $tenant): void { + if ($this->shouldCreateDatabase($tenant)) { + $this->database->ensureTenantCanBeCreated($tenant); + } + $this->storage->ensureTenantCanBeCreated($tenant); - $this->database->ensureTenantCanBeCreated($tenant); } /**