Mid EF Core

How do you rollback or revert a migration?

To remove the last migration before applying it:

dotnet ef migrations remove

To rollback the database to a previous migration:

dotnet ef database update MigrationName

To rollback all migrations:

dotnet ef database update 0

More from Entity Framework Core Tutorial

All questions for this course