Entity framework Core Update-database specific migration

后端 未结 3 1436
Happy的楠姐
Happy的楠姐 2021-02-01 11:49

I am trying to figure out how to run a specific migration from the package manager in nuget.

I have tried to run:

 update-database -TargetMigration test3         


        
3条回答
  •  梦毁少年i
    2021-02-01 12:27

    The best answer given by Dmitry is a bit incorrect. There's no parameter -Target. The only parameter that can be applied is -Migration. Therefore, the right answer is:

    Update-Database -Migration test32
    

提交回复
热议问题