EF (Entity Framework) 4.3 Migration tool does not work on EF 4.1 DB

前端 未结 2 899
野趣味
野趣味 2020-12-16 05:59

I want to modify one DB which was developed with EF 4.1 (Code First). I upgraded the project into EF 4.3 and follow this steps: http://blogs.msdn.com/b/adonet/archive/2012/0

相关标签:
2条回答
  • 2020-12-16 06:18

    Run "Add-Migration InitialMigration -IgnoreChanges" before doing any changes to the model.. Make the required changes, then run "update-database"

    0 讨论(0)
  • 2020-12-16 06:23

    You need to create an empty migration and execute it prior to doing changes to your model. It will create the migration history table for you. After that you can use migrations for new changes. I wrote walkthrough article about this topic.

    0 讨论(0)
提交回复
热议问题