1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 22:54: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,10 +145,13 @@ class TenantManager
*/
public function ensureTenantCanBeCreated(Tenant $tenant): void
{
$this->storage->ensureTenantCanBeCreated($tenant);
if ($this->shouldCreateDatabase($tenant)) {
$this->database->ensureTenantCanBeCreated($tenant);
}
$this->storage->ensureTenantCanBeCreated($tenant);
}
/**
* Update an existing tenant in storage.
*