mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 09:54:05 +00:00
Get old tests to pass
This commit is contained in:
parent
65ebc043dc
commit
439b5b1dc1
28 changed files with 154 additions and 100 deletions
|
|
@ -45,6 +45,12 @@ class Migrate extends MigrateCommand
|
|||
*/
|
||||
public function handle()
|
||||
{
|
||||
foreach (config('tenancy.migration_parameters') as $parameter => $value) {
|
||||
if (! $this->input->hasParameterOption($parameter)) {
|
||||
$this->input->setOption(ltrim($parameter, '-'), $value);
|
||||
}
|
||||
}
|
||||
|
||||
if (! $this->confirmToProceed()) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -52,8 +58,6 @@ class Migrate extends MigrateCommand
|
|||
tenancy()->all($this->option('tenants'))->each(function ($tenant) {
|
||||
$this->line("Tenant: {$tenant['id']}");
|
||||
|
||||
$this->input->setOption('database', $tenant->database()->getTemplateConnectionName());
|
||||
|
||||
$tenant->run(function () {
|
||||
// Migrate
|
||||
parent::handle();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue