mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 08:04:03 +00:00
Assert createDatabase() success
Pretty much all errors that can happen in createDatabase() end up throwing an exception, however the function still does return a boolean (it bubbles up the value from the underlying $conn->statement() call) which should be checked in at least some way.
This commit is contained in:
parent
151e81b412
commit
ddf83c4b55
1 changed files with 1 additions and 1 deletions
|
|
@ -40,7 +40,7 @@ class CreateDatabase implements ShouldQueue
|
|||
|
||||
try {
|
||||
$databaseManager->ensureTenantCanBeCreated($this->tenant);
|
||||
$this->tenant->database()->manager()->createDatabase($this->tenant);
|
||||
assert($this->tenant->database()->manager()->createDatabase($this->tenant) === true);
|
||||
|
||||
event(new DatabaseCreated($this->tenant));
|
||||
} catch (TenantDatabaseAlreadyExistsException | TenantDatabaseUserAlreadyExistsException $e) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue