Lose EF Code First Migration when working on different TFS branches?

前端 未结 3 1352
攒了一身酷
攒了一身酷 2020-12-23 09:44

We are using TFS and have different branches for our Dev.

  1. in the branch A we made a migration to change a column size

  2. in the branch B we mad

3条回答
  •  孤城傲影
    2020-12-23 10:47

    As an addition to Anders Abel's answer and for those of you who are having the issue when trying to regenerate the last migrations metadata causing EF to create a separate migration with a 1 appended to it.

    You must include the full date/time stamp.

    E.g.

    If the filename of your previous migration is 201701011322_MakeChangesToPotatoTable

    Then you must include the fullname properly in the "Add-Migration" command.

    I.E.

    Add-Migration 201701011322_MakeChangesToPotatoTable
    

提交回复
热议问题