mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-06 07:34:02 +00:00
Check for the the testing env in DB bootstrapper
This commit is contained in:
parent
f46e7b2858
commit
343de54b40
1 changed files with 1 additions and 1 deletions
|
|
@ -25,7 +25,7 @@ class DatabaseTenancyBootstrapper implements TenancyBootstrapper
|
||||||
/** @var TenantWithDatabase $tenant */
|
/** @var TenantWithDatabase $tenant */
|
||||||
|
|
||||||
// Better debugging, but breaks cached lookup in prod
|
// Better debugging, but breaks cached lookup in prod
|
||||||
if (app()->environment('local')) {
|
if (app()->environment('local') || app()->environment('testing')) {
|
||||||
$database = $tenant->database()->getName();
|
$database = $tenant->database()->getName();
|
||||||
if (! $tenant->database()->manager()->databaseExists($database)) {
|
if (! $tenant->database()->manager()->databaseExists($database)) {
|
||||||
throw new TenantDatabaseDoesNotExistException($database);
|
throw new TenantDatabaseDoesNotExistException($database);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue