mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 11:14:04 +00:00
Migration paths (#268)
* allow multiple paths for tenant migrations * tests: allow multiple paths for tenant migrations * Update tests/CommandsTest.php Co-Authored-By: Samuel Štancl <samuel.stancl@gmail.com> * Update src/Traits/DealsWithMigrations.php Co-Authored-By: Samuel Štancl <samuel.stancl@gmail.com> * Update tests/CommandsTest.php Co-Authored-By: Samuel Štancl <samuel.stancl@gmail.com> * Update src/Traits/DealsWithMigrations.php Co-Authored-By: Samuel Štancl <samuel.stancl@gmail.com> * Update tests/TestCase.php Co-Authored-By: Samuel Štancl <samuel.stancl@gmail.com> Co-authored-by: Samuel Štancl <samuel.stancl@gmail.com>
This commit is contained in:
parent
95ee295da1
commit
06ee1ff0e2
3 changed files with 3 additions and 3 deletions
|
|
@ -12,6 +12,6 @@ trait DealsWithMigrations
|
||||||
return parent::getMigrationPaths();
|
return parent::getMigrationPaths();
|
||||||
}
|
}
|
||||||
|
|
||||||
return [config('tenancy.migrations_directory', database_path('migrations/tenant'))];
|
return config('tenancy.migration_paths', [config('tenancy.migrations_directory') ?? database_path('migrations/tenant')]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ class CommandsTest extends TestCase
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
config(['tenancy.migrations_directory' => database_path('../migrations')]);
|
config(['tenancy.migration_paths', [database_path('../migrations')]]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @test */
|
/** @test */
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,7 @@ abstract class TestCase extends \Orchestra\Testbench\TestCase
|
||||||
'tenancy.redis.tenancy' => env('TENANCY_TEST_REDIS_TENANCY', true),
|
'tenancy.redis.tenancy' => env('TENANCY_TEST_REDIS_TENANCY', true),
|
||||||
'database.redis.client' => env('TENANCY_TEST_REDIS_CLIENT', 'phpredis'),
|
'database.redis.client' => env('TENANCY_TEST_REDIS_CLIENT', 'phpredis'),
|
||||||
'tenancy.redis.prefixed_connections' => ['default'],
|
'tenancy.redis.prefixed_connections' => ['default'],
|
||||||
'tenancy.migrations_directory' => database_path('../migrations'),
|
'tenancy.migration_paths' => [database_path('../migrations')],
|
||||||
'tenancy.storage_drivers.db.connection' => 'central',
|
'tenancy.storage_drivers.db.connection' => 'central',
|
||||||
'tenancy.bootstrappers.redis' => \Stancl\Tenancy\TenancyBootstrappers\RedisTenancyBootstrapper::class,
|
'tenancy.bootstrappers.redis' => \Stancl\Tenancy\TenancyBootstrappers\RedisTenancyBootstrapper::class,
|
||||||
'queue.connections.central' => [
|
'queue.connections.central' => [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue