tomatophp / filament-tenancy

Tenancy multi-database integration for FilamentPHP
https://tomatophp.com/en/open-source/filament-tenancy
MIT License
34 stars 8 forks source link

Register tenent #6

Closed xx1196 closed 1 month ago

xx1196 commented 1 month ago

Hello, how i can create the main tenant? i need create app tenant like this $tenant1 = Tenant::create(['id' => 'app']); but i have an error:

SQLSTATE[23505]: Unique violation: 7 ERROR: duplicate key violates uniqueness constraint "tenants_pkey" DETAIL: The key (id)=(app) already exists. (Connection: pgsql, SQL: insert into "tenants" ("id", "data", "updated_at", "created_at") values ​​(app, [], 2024-09-20 02:14:42, 2024-09 -20 02:14:42))

thanks

linear[bot] commented 1 month ago

TOT-86 Register tenent

3x1io commented 1 month ago

because the ID of the tenant is unique you can't double it

xx1196 commented 1 month ago

I know that, but it gets stuck in an infinite loop creating thousands of tenants.

3x1io commented 1 month ago

i think I can't understand your problem, so please share some images or part of the code to understand that.