Have a configuration to prevent migrations seed method from being called


(Forgive me if this is redundant. I did search the issues and discussions for something related and could not find it.)

With EF5 migraitons, the seed method is always called regardless of schema changes. Arthur VIckers explains the logic behind this in this stackoverflow thread (http://stackoverflow.com/questions/10822618/confusion-over-ef-auto-migrations-and-seeding-seeding-every-program-start).

We need more control over when seeding occurs. A DbMigrationsConfiguration setting perhaps?

SeedOnlyWhenSchemaChanges or something like that?

There are ways to solve this in code, but doing so is cumbersome and not discoverable.



RoMiller wrote Feb 7, 2013 at 10:21 PM

EF Team Triage: This is small, we should push to get it into EF6 even though it's lower priority.

jlerman wrote Feb 8, 2013 at 12:18 AM


Dave69B wrote Sep 24, 2013 at 3:05 PM

I would appreciate this feature too. Will it be in EF6?

spongman wrote Oct 29, 2013 at 6:53 PM

This is small
really, it seems like an oversight to force the seed method to be run, even if the schema hasn't changed.

what if the seed method takes an hour to run?

johnny_reilly wrote Jun 23 at 3:28 PM


Just wondering if there was an update on the status of this please? I'm guessing this didn't get released with 6 or 6.1 given the status but I wanted to check...