1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 15:34:04 +00:00

Use QueryException instead of Exception

This commit is contained in:
lukinovec 2022-09-22 15:24:07 +02:00
parent 726f769318
commit f505b7e1af
2 changed files with 6 additions and 5 deletions

View file

@ -4,10 +4,10 @@ declare(strict_types=1);
namespace Stancl\Tenancy\Commands;
use Exception;
use Illuminate\Contracts\Events\Dispatcher;
use Illuminate\Database\Console\Migrations\MigrateCommand;
use Illuminate\Database\Migrations\Migrator;
use Illuminate\Database\QueryException;
use Stancl\Tenancy\Concerns\DealsWithMigrations;
use Stancl\Tenancy\Concerns\ExtendsLaravelCommand;
use Stancl\Tenancy\Concerns\HasATenantsOption;
@ -58,7 +58,7 @@ class Migrate extends MigrateCommand
parent::handle();
event(new DatabaseMigrated($tenant));
} catch (Exception $th) {
} catch (QueryException $th) {
if (! $this->option('skip-failing')) {
throw $th;
}