Using Entity Framework (code first) migrations in production
There is a Database Initializer you can use to achieve the migration to latest version on startup (or better, the dbinitializer will kick in on first db access), the MigrateDatabaseToLatestVersion, you use it like that: Database.SetInitializer<ObjectContext>( new MigrateDatabaseToLatestVersion<ObjectContext, Configuration>()); Regarding having one file per migration, if you enable automatic migrations you will find them in … Read more