Q: Entity Framework: How to disable model compatibility check in Code First Migrations I would like to create a database initializer that runs all the pending migrations regardless of whether the model is in the correct state or not. I.e. I want the initializer to run all the migrations even if it thinks the model state has changed since generating the migration so that it doesn't through the following error:

Unable to update database to match the current model because there are pending changes and automatic migration is disabled.

Does anyone know how I might get this to work?

A: Turn on automatic migrations. The error says that it cannot get your database in sync with your code because your classes contains changes which are not in any of your code based migrations. 
