mirror of
https://github.com/archtechx/tenancy.git
synced 2026-06-21 04:04:03 +00:00
comment grammar
This commit is contained in:
parent
1ae7d58fab
commit
0fdc59dc5d
1 changed files with 2 additions and 2 deletions
|
|
@ -92,14 +92,14 @@ class DatabaseTenancyBootstrapper implements TenancyBootstrapper
|
|||
/** @var \Stancl\Tenancy\Database\Models\Tenant&TenantWithDatabase $tenant */
|
||||
$tenantDbName = $tenant->database()->getName();
|
||||
|
||||
// Check if any other tenant uses this tenant's database
|
||||
// Check that no other tenant uses this tenant's database
|
||||
if ($tenant::where($tenant->getTenantKeyName(), '!=', $tenant->getTenantKey())
|
||||
->where($tenant::getDataColumn() . '->' . $tenant->internalPrefix() . 'db_name', $tenantDbName)
|
||||
->exists()) {
|
||||
throw new RuntimeException('Tenant cannot use a database of another tenant.');
|
||||
}
|
||||
|
||||
// Check if the current database is not the central database
|
||||
// Check that the current database is not the central database
|
||||
$centralDbName = DB::connection(
|
||||
config('tenancy.database.central_connection', 'central')
|
||||
)->getDatabaseName();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue