Entity Framework rollback and remove bad migration

后端 未结 8 2279
[愿得一人]
[愿得一人] 2020-12-12 09:01

I\'m using EF 6.0 for my project in C# with manual migrations and updates. I have about 5 migrations on the database, but I realised that the last migration was bad and I do

8条回答
  •  温柔的废话
    2020-12-12 09:26

    First, Update your last perfect migration via this command :

    Update-Database –TargetMigration
    

    Example:

    Update-Database -20180906131107_xxxx_xxxx
    

    And, then delete your unused migration manually.

提交回复
热议问题