Wie man eine Migration in ASP.NET Core mit EF Core aufhebt

Wenn ich PM> Remove-Migration -context BloggingContext im VS2015 mit einem ASP.NET Core-Projekt mit EF-Core bekomme ich die folgende Fehlermeldung:

System.InvalidOperationException: The migration '20160703192724_MyFirstMigration' has already been applied to the database. Unapply it and try again. If the migration has been applied to other databases, consider reverting its changes using a new migration.    at Microsoft.EntityFrameworkCore.Migrations.Design.MigrationsScaffolder.RemoveMigration(String projectDir, String rootNamespace, Boolean force) 
    at Microsoft.EntityFrameworkCore.Design.MigrationsOperations.RemoveMigration(String contextType, Boolean force) 
    at Microsoft.EntityFrameworkCore.Tools.Cli.MigrationsRemoveCommand.<>c__DisplayClass0_0.<Configure>b__0() 
    at Microsoft.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args) 
    at Microsoft.EntityFrameworkCore.Tools.Cli.Program.Main(String[] args) 
 The migration '20160703192724_MyFirstMigration' has already been applied to the database. Unapply it and try again. If the migration has been applied to other databases, consider reverting its changes using a new migration.

Wie kann ich die änderungen zurücknehmen? Ich bin mit der neuesten Version von ASP.NET Kern 1.0, EF-Core, und VS2015 Update 3.

InformationsquelleAutor der Frage nam | 2016-07-04

Schreibe einen Kommentar