Finbuckle / Finbuckle.MultiTenant

Finbuckle.MultiTenant is an open-source multitenancy middleware library for .NET. It enables tenant resolution, per-tenant app behavior, and per-tenant data isolation.
https://www.finbuckle.com/multitenant
Apache License 2.0
1.32k stars 267 forks source link

Migrations support for EF Core? #657

Open jeremy-holovacs-sp opened 1 year ago

jeremy-holovacs-sp commented 1 year ago

How would someone manage migrations for a new tenant? Is there a way to create a db shard on the fly when encountering a new tenant?

AndrewTriesToCode commented 1 year ago

Hi, I'm sorry for the slow reply. That is a good question and beyond the scope of the library's capability. I've had success giving all tenants their own connection strings and using Azure Elastic SQL databases so in that case they always had their own logical database and if one needs more resources Azure can handle it.

The tricky scenario is if using a shared database via MultiTenantDbContext or similar and then wanting to pull out a single tenant into their own. There's currently no built in support for that.