How to unapply a migration in ASP.NET Core with EF Core

前端 未结 16 2301
余生分开走
余生分开走 2020-12-07 08:10

When I run PM> Remove-Migration -context BloggingContext in VS2015 with an ASP.NET Core project using EF Core I get the following error:

Syst         


        
16条回答
  •  长情又很酷
    2020-12-07 08:47

    In order to unapply a migration in EF Core 1.0 use the command:

    dotnet ef database update {migration_name}

    Use the migration name of the migration until which you would like to preserve your changes. The list of names of the migration can be found using:

    dotnet ef migrations list

提交回复
热议问题