EF Core CodeFirst Remove-migration 删除迁移报错

EF Core 在vs2017执行Remove-migration 删除迁移报错

报错信息:The migration '20180828010718_init' has already been applied to the database. Revert it and try again. If the migration has been applied to other databases, consider reverting its changes using a new migration.

解决方法:

1、Update-Database -Migration:0  (删除表结构)

2、Remove-Migration (删除迁移文件)

 成功删除 add-migration 生成的迁移文件,但数据库和数据库迁移记录表还存在的。但并没影响再次执行 add-migration 生成的新迁移文件。

 

posted on 2018-08-28 10:03  Martin cheng  阅读(1824)  评论(0编辑  收藏  举报

导航