1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 11:14:04 +00:00
This commit is contained in:
Samuel Štancl 2022-10-01 17:59:33 +02:00
parent 065b029f48
commit 24146b26e2
7 changed files with 17 additions and 13 deletions

View file

@ -13,8 +13,6 @@ use Stancl\Tenancy\Database\Concerns\HasScopedValidationRules;
use Stancl\Tenancy\Tests\Etc\Tenant as TestTenant;
beforeEach(function () {
BelongsToTenant::$tenantIdColumn = 'tenant_id';
Schema::create('posts', function (Blueprint $table) {
$table->increments('id');
$table->string('text');
@ -144,7 +142,7 @@ test('tenant id is not auto added when creating primary resources in central con
});
test('tenant id column name can be customized', function () {
BelongsToTenant::$tenantIdColumn = 'team_id';
config(['tenancy.single_db.tenant_id_column' => 'team_id']);
Schema::drop('comments');
Schema::drop('posts');