1
0
Fork 0
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:
Samuel Štancl 2019-08-16 12:00:30 +02:00
parent 9cdf3dcab6
commit fefe12dab4

View file

@ -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();
} }