0
rick@dripjobs.com created
1 Answer(s)
-
0
hi
Separate tenant schema is means:
This solution configured so it uses two database schema;
- Default schema is used to store host & tenant data (when the tenant uses shared database).
- Tenant schema is used to store only the tenant data (when the tenant uses a dedicated database).
In this way, dedicated tenant databases do not have host-related empty tables.
To make this possible, there are two migrations
DbContext
in theEntityFrameworkCore
project. So, you need to specify theDbContext
when you want to add new migration.When you add/change a multi-tenant entity (that implements IMultiTenant) in your project, you typically need to add two migrations: one for the default DbContext and the other one is for the tenant DbContext. If you are making change for a host-only entity, then you don't need to add-migration for the tenant DbContext (if you add, you will get an empty migration file).