1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 18:44:03 +00:00

Check that the tenant database can be created only if it should be created

This commit is contained in:
Samuel Štancl 2020-03-24 15:02:23 +01:00
parent cf339a5e82
commit df99e3e711

View file

@ -145,8 +145,11 @@ class TenantManager
*/ */
public function ensureTenantCanBeCreated(Tenant $tenant): void public function ensureTenantCanBeCreated(Tenant $tenant): void
{ {
if ($this->shouldCreateDatabase($tenant)) {
$this->database->ensureTenantCanBeCreated($tenant);
}
$this->storage->ensureTenantCanBeCreated($tenant); $this->storage->ensureTenantCanBeCreated($tenant);
$this->database->ensureTenantCanBeCreated($tenant);
} }
/** /**