Finbuckle.MultiTenant icon indicating copy to clipboard operation
Finbuckle.MultiTenant copied to clipboard

Migrations support for EF Core?

Open jeremy-holovacs-sp opened this issue 2 years ago • 2 comments

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?

jeremy-holovacs-sp avatar May 11 '23 13:05 jeremy-holovacs-sp

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.

AndrewTriesToCode avatar Jul 13 '23 00:07 AndrewTriesToCode