Manually add a migration?

后端 未结 1 1426
逝去的感伤
逝去的感伤 2021-01-19 08:30

I\'ve been using Entity framework code first in a project and all the tables have been created /modified a while ago. Now I need to add an unique constraint to a table. I wa

相关标签:
1条回答
  • 2021-01-19 08:34

    Using add-migration is the way for this. Just use add-migration yourMigrationName and it will automatically create all the files you need.

    Then you just alter the Up() and Down() methods with the values that you need

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