diff --git a/src/Commands/Migrate.php b/src/Commands/Migrate.php index bea55c8e..d9ba4938 100644 --- a/src/Commands/Migrate.php +++ b/src/Commands/Migrate.php @@ -53,7 +53,7 @@ class Migrate extends MigrateCommand tenancy()->all($this->option('tenants'))->each(function ($tenant) { $this->line("Tenant: {$tenant['id']}"); - $this->input->setOption('database', $tenant->getDatabaseName()); + $this->input->setOption('database', $tenant->getConnectionName()); tenancy()->initialize($tenant); // Migrate diff --git a/src/Commands/Rollback.php b/src/Commands/Rollback.php index ed880af6..b9168bf7 100644 --- a/src/Commands/Rollback.php +++ b/src/Commands/Rollback.php @@ -53,7 +53,7 @@ class Rollback extends RollbackCommand tenancy()->all($this->option('tenants'))->each(function ($tenant) { $this->line("Tenant: {$tenant['id']}"); - $this->input->setOption('database', $tenant->getDatabaseName()); + $this->input->setOption('database', $tenant->getConnectionName()); tenancy()->initialize($tenant); // Migrate diff --git a/src/Commands/Seed.php b/src/Commands/Seed.php index 048fd98d..61630408 100644 --- a/src/Commands/Seed.php +++ b/src/Commands/Seed.php @@ -51,7 +51,7 @@ class Seed extends SeedCommand tenancy()->all($this->option('tenants'))->each(function ($tenant) { $this->line("Tenant: {$tenant['id']}"); - $this->input->setOption('database', $tenant->getDatabaseName()); + $this->input->setOption('database', $tenant->getConnectionName()); tenancy()->initialize($tenant); // Seed