diff --git a/src/Commands/Migrate.php b/src/Commands/Migrate.php index 34cd09bf..6ecd6e14 100644 --- a/src/Commands/Migrate.php +++ b/src/Commands/Migrate.php @@ -58,13 +58,13 @@ class Migrate extends MigrateCommand } if ($this->getProcesses() > 1) { - return $this->runConcurrently($this->getTenantChunks()->map(function ($chunk) { + $code = $this->runConcurrently($this->getTenantChunks()->map(function ($chunk) { return $this->getTenants($chunk); })); + } else { + $code = $this->migrateTenants($this->getTenants()) ? 0 : 1; } - $code = $this->migrateTenants($this->getTenants()) ? 0 : 1; - // Reset the template tenant connection to the original one config(['tenancy.database.template_tenant_connection' => $originalTemplateConnection]);