diff --git a/composer.json b/composer.json index 49fa840f..f3622760 100644 --- a/composer.json +++ b/composer.json @@ -12,8 +12,7 @@ "require": { "illuminate/support": "^6.0", "webpatser/laravel-uuid": "^3.0", - "facade/ignition-contracts": "^1.0", - "nesbot/carbon": "^2.0" + "facade/ignition-contracts": "^1.0" }, "require-dev": { "vlucas/phpdotenv": "^3.3", diff --git a/src/Commands/Migrate.php b/src/Commands/Migrate.php index cf7b1c26..b32a5f16 100644 --- a/src/Commands/Migrate.php +++ b/src/Commands/Migrate.php @@ -60,12 +60,12 @@ class Migrate extends MigrateCommand // Migrate parent::handle(); + + tenancy()->endTenancy(); }); if ($originalTenant) { tenancy()->initialize($originalTenant); - } else { - tenancy()->endTenancy(); } } } diff --git a/src/Commands/Rollback.php b/src/Commands/Rollback.php index 7883ee86..f19e5fa4 100644 --- a/src/Commands/Rollback.php +++ b/src/Commands/Rollback.php @@ -58,12 +58,12 @@ class Rollback extends RollbackCommand // Migrate parent::handle(); + + tenancy()->endTenancy(); }); if ($originalTenant) { tenancy()->initialize($originalTenant); - } else { - tenancy()->endTenancy(); } } } diff --git a/src/Commands/Run.php b/src/Commands/Run.php index e6fc012f..874b1f86 100644 --- a/src/Commands/Run.php +++ b/src/Commands/Run.php @@ -60,8 +60,6 @@ class Run extends Command if ($originalTenant) { tenancy()->initialize($originalTenant); - } else { - tenancy()->endTenancy(); } } } diff --git a/src/Commands/Seed.php b/src/Commands/Seed.php index 7b0b5177..2018feb8 100644 --- a/src/Commands/Seed.php +++ b/src/Commands/Seed.php @@ -56,12 +56,12 @@ class Seed extends SeedCommand // Seed parent::handle(); + + tenancy()->endTenancy(); }); if ($originalTenant) { tenancy()->initialize($originalTenant); - } else { - tenancy()->endTenancy(); } } }