mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 19:34:04 +00:00
Add tenantSchemaPath method
This commit is contained in:
parent
9a8e95c9f6
commit
713a1b4afc
1 changed files with 6 additions and 1 deletions
|
|
@ -54,6 +54,11 @@ afterEach(function () {
|
|||
}
|
||||
});
|
||||
|
||||
function tenantSchemaPath(): string
|
||||
{
|
||||
return database_path('schema/tenant-schema.dump');
|
||||
}
|
||||
|
||||
test('migrate command doesnt change the db connection', function () {
|
||||
expect(Schema::hasTable('users'))->toBeFalse();
|
||||
|
||||
|
|
@ -121,7 +126,7 @@ test('dump command works', function () {
|
|||
});
|
||||
|
||||
test('tenant dump file gets created as tenant-schema.dump in the database schema folder by default', function() {
|
||||
config(['tenancy.migration_parameters.--schema-path' => $schemaPath = database_path('schema/tenant-schema.dump')]);
|
||||
config(['tenancy.migration_parameters.--schema-path' => $schemaPath = tenantSchemaPath()]);
|
||||
|
||||
$tenant = Tenant::create();
|
||||
Artisan::call('tenants:migrate');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue