mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-16 19:34:03 +00:00
Create MySQL/PostgreSQL DBs while using sqlite as the central DB driver
This commit is contained in:
parent
1e6b21cfd4
commit
eb6cba8f1a
11 changed files with 62 additions and 22 deletions
|
|
@ -54,7 +54,6 @@ class DatabaseStorageDriver implements StorageDriver
|
|||
|
||||
public function ensureTenantCanBeCreated(Tenant $tenant): void
|
||||
{
|
||||
// todo2 test this
|
||||
if (Tenants::find($tenant->id)) {
|
||||
throw new TenantWithThisIdAlreadyExistsException($tenant->id);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ class TenantModel extends Model
|
|||
|
||||
public function getMany(array $keys): array
|
||||
{
|
||||
return array_reduce($keys, function ($result, $key) { // todo2 performance
|
||||
return array_reduce($keys, function ($result, $key) {
|
||||
$result[$key] = $this->get($key);
|
||||
|
||||
return $result;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue