mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-14 17:04:03 +00:00
Rolling back & deleting DB events
This commit is contained in:
parent
2839f45196
commit
78c64f0425
4 changed files with 24 additions and 0 deletions
|
|
@ -11,6 +11,7 @@ use Stancl\Tenancy\Concerns\DealsWithMigrations;
|
|||
use Stancl\Tenancy\Concerns\HasATenantsOption;
|
||||
use Stancl\Tenancy\DatabaseManager;
|
||||
use Stancl\Tenancy\Events\DatabaseRolledBack;
|
||||
use Stancl\Tenancy\Events\RollingBackDatabase;
|
||||
|
||||
class Rollback extends RollbackCommand
|
||||
{
|
||||
|
|
@ -59,6 +60,8 @@ class Rollback extends RollbackCommand
|
|||
tenancy()->runForMultiple($this->option('tenants'), function ($tenant) {
|
||||
$this->line("Tenant: {$tenant['id']}");
|
||||
|
||||
event(new RollingBackDatabase($tenant));
|
||||
|
||||
// Rollback
|
||||
parent::handle();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue