I'm working on a multi-tenant MVC 4 application and I'm going with the one schema per customer approach. I'd like to run the database migrations in code when a customer signs up. Is this possible using EF 5/Code First Migrations?
So when a customer signs up, I'll create an account in dbo. I'll then check if their subdomain exists as a schema in the database, if not, I'll create the schema and ideally run the migrations.
Thanks!
Clarification
When I create the new schema for the customer in the database, I want to run the migrations for that new schema. So for example,
I'll have schema1.Products and schema2.Products.