mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 17:24:03 +00:00
Check that the tenant database can be created only if it should be created
This commit is contained in:
parent
cf339a5e82
commit
df99e3e711
1 changed files with 4 additions and 1 deletions
|
|
@ -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.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue