3
Vote

Have a configuration to prevent migrations seed method from being called

description

(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.

Thanks

comments

RoMiller wrote Feb 7 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 at 12:18 AM

:)