Closed sambathsrey closed 2 years ago
You can refer to this example project, it uses a user_tenant_id every where that refers to the ids in the user - tenant relation table.
If you don't need the user, just the tenant, you can store the tenant_id in each table that refers the id in the tenants table, as long as both tables are in the same db.
Thank you.
Thank you for providing this awesome boilerplate! How can I identify data that belong to the specific tenant? How many approaches can I implement? As my research I have seen that I need to have an identifier column "tenant_id" for every tables. If so, how should I use that "tenant_id" column? Should it be a foreign key or just a normal column?