Blog{tacular} Triptacular logo

Check out some of the places, events, other news and technologies that we occasionally write about.

Create EF Migration Rollback Script

Script EF Core migration roll backs using the PM console.

To produce a script which will revert database changes from one EF Migration to the next in EF Core, simply open the Package Manager Console and issue

Script-Migration {LatestMigration} {PreviousMigration}

A broader discussion of this and related issues can be found at this Q&A over at Stack Overflow.

Leave a comment

Please note that we won't show your email to others, or use it for sending unwanted emails. We will only use it to render your Gravatar image and to validate you as a real person.