1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 22:34:03 +00:00

Use the hardcoded default path in TenantDump only if the path isn't configured (#1019)

* Use the hardcoded tenant dump path only if the path isn't configured

* Test generating tenant dump at the configured path
This commit is contained in:
lukinovec 2022-11-23 13:12:29 +01:00 committed by GitHub
parent cb7567a88a
commit ea19117870
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 1 deletions

View file

@ -23,7 +23,7 @@ class TenantDump extends DumpCommand
public function handle(ConnectionResolverInterface $connections, Dispatcher $dispatcher): int
{
if (is_null($this->option('path'))) {
$this->input->setOption('path', database_path('schema/tenant-schema.dump'));
$this->input->setOption('path', config('tenancy.migration_parameters.--schema-path') ?? database_path('schema/tenant-schema.dump'));
}
$tenant = $this->option('tenant')