mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 05:14:03 +00:00
wip
This commit is contained in:
parent
0b6af429de
commit
f9a819215f
1 changed files with 7 additions and 5 deletions
|
|
@ -46,16 +46,18 @@ class CommandsTest extends TestCase
|
||||||
// connection is sqlite
|
// connection is sqlite
|
||||||
dump(Schema::getConnection()->getName());
|
dump(Schema::getConnection()->getName());
|
||||||
|
|
||||||
$tenant = tenant()->create('test.localhost');
|
tenancy()->init('localhost'); // reconnect the DB
|
||||||
Artisan::call('tenants:migrate', [
|
|
||||||
'--tenants' => [$tenant['uuid']]
|
|
||||||
]);
|
|
||||||
|
|
||||||
// connection should be tenant at this point. is still sqlite
|
// connection should be tenant at this point. is still sqlite
|
||||||
dump(Schema::getConnection()->getName());
|
dump(Schema::getConnection()->getName());
|
||||||
// if you remove line 47, connection will be tenant at this point
|
// if you remove line 47, connection will be tenant at this point
|
||||||
dd('stop');
|
dd('stop');
|
||||||
|
|
||||||
|
$tenant = tenant()->create('test.localhost');
|
||||||
|
Artisan::call('tenants:migrate', [
|
||||||
|
'--tenants' => [$tenant['uuid']]
|
||||||
|
]);
|
||||||
|
|
||||||
$this->assertFalse(Schema::hasTable('users'));
|
$this->assertFalse(Schema::hasTable('users'));
|
||||||
tenancy()->init('localhost');
|
tenancy()->init('localhost');
|
||||||
$this->assertFalse(Schema::hasTable('users'));
|
$this->assertFalse(Schema::hasTable('users'));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue