entity framework - How do I consolidate migrations using EF Core? -


i have these migrations:

00000000000000_first 20161101000000_foo 20161102000000_bar // ...many many many more 20161108000000_baz 

i want consolidate foo baz 1 new migration. know how in ef, not in ef core.

i tried this:

dotnet ef update database 00000000000000_first // delete other migration classes dotnet ef migrations add consolidated dotnet ef update 

i expect new consolidated migration contain changes model. up() , down() methods empty.

what doing wrong?

you're missing 1 step. because of new model snapshot, after manually delete migration files, you'll need run dotnet ef migrations remove (or remove-migration in pmc) in sync.

instead of manually deleting files, run dotnet ef migrations remove multiple times, it's smart enough detect manually deleted migrations.


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -