Errors during Code First add-migration

后端 未结 1 1712
梦毁少年i
梦毁少年i 2020-12-10 11:24

Our add-migrations are failing routinely but not consistently. The migration always gets to the scaffolding step and then roughly 4 out of 5 times we will receive something

相关标签:
1条回答
  • 2020-12-10 12:19

    This happened to me on some long running scripts that generated new indexes. The workaround that we used was to use:

    update-database -Script
    

    EF then spits out the SQL migration to the screen and then we could run the SQL directly from the server so there were no timeout problems.

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