mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-04 10:24:03 +00:00
Reset template connection regardless of process count
This commit is contained in:
parent
ae9b91d62e
commit
916316f1e8
1 changed files with 3 additions and 3 deletions
|
|
@ -58,13 +58,13 @@ class Migrate extends MigrateCommand
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->getProcesses() > 1) {
|
if ($this->getProcesses() > 1) {
|
||||||
return $this->runConcurrently($this->getTenantChunks()->map(function ($chunk) {
|
$code = $this->runConcurrently($this->getTenantChunks()->map(function ($chunk) {
|
||||||
return $this->getTenants($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
|
// Reset the template tenant connection to the original one
|
||||||
config(['tenancy.database.template_tenant_connection' => $originalTemplateConnection]);
|
config(['tenancy.database.template_tenant_connection' => $originalTemplateConnection]);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue