mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-04 19:04:03 +00:00
Fix issues caused by loadMigrationsFrom
This commit is contained in:
parent
9cdf3dcab6
commit
fefe12dab4
1 changed files with 6 additions and 4 deletions
|
|
@ -23,9 +23,11 @@ abstract class TestCase extends \Orchestra\Testbench\TestCase
|
||||||
Redis::connection('tenancy')->flushdb();
|
Redis::connection('tenancy')->flushdb();
|
||||||
Redis::connection('cache')->flushdb();
|
Redis::connection('cache')->flushdb();
|
||||||
|
|
||||||
config(['database.default' => 'central']);
|
$this->loadMigrationsFrom([
|
||||||
$this->loadLaravelMigrations(['--database' => 'central']);
|
'--path' => realpath(__DIR__ . '/../src/assets/migrations'),
|
||||||
$this->loadMigrationsFrom(realpath(__DIR__ . '/../src/assets/migrations'));
|
'--database' => 'central',
|
||||||
|
]);
|
||||||
|
config(['database.default' => 'sqlite']); // fix issue caused by loadMigrationsFrom
|
||||||
|
|
||||||
if ($this->autoCreateTenant) {
|
if ($this->autoCreateTenant) {
|
||||||
$this->createTenant();
|
$this->createTenant();
|
||||||
|
|
@ -38,7 +40,7 @@ abstract class TestCase extends \Orchestra\Testbench\TestCase
|
||||||
|
|
||||||
protected function tearDown(): void
|
protected function tearDown(): void
|
||||||
{
|
{
|
||||||
config(['database.default' => 'central']);
|
// config(['database.default' => 'central']);
|
||||||
|
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue