Ignore pending migrations after database recreation
问题 We am using code first EF 4.3.1 with database migrations. Sometimes we drop the database and let EF recreate it, mainly for local development purposes. There is a procedure which applies pending migrations and when the database is recreated the pending migrations aren't necessary and error is thrown when EF tries to apply them. I check the migration date from the string and if this is before the database creation date then I manually add it to the __migrationHistory table and don't apply the