Migration lost when working with TFS RRS feed

  • General discussion

  • Hi,

    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 made a migration to add a new table. This branch doesn not know about the branch A modification !!

    3. both modification are merged to the main branch.

    when I do an update database, it does the 2 migration but at the end tells me there is pending changes. If I do an Add-Migration, it creates the same as the 1st migration (in branch A).

    Unable to update database to match the current model because there are pending changes and automatic migration is disabled. Either write the pending model changes to a code-based migration or enable automatic migration. Set DbMigrationsConfiguration.AutomaticMigrationsEnabled to true to enable automatic migration.
    You can use the Add-Migration command to write the pending model changes to a code-based migration.

    Is it because something is missing in  the content of the property Target de IMigrationMetadata of my last migration since it didn't know about the 1st one ?

    Is it possible to handle migrations in differents TFS branches ?


    Monday, April 16, 2012 9:23 AM

All replies

    There is a whole sedition of forums in MSDN.EN-US for TFS.
    Monday, April 16, 2012 4:57 PM
  • I know but the problem is about Code First Migration not TFS. Posting my issue on the TFS forum won't help in any way.

    • Edited by bouh Monday, April 16, 2012 5:02 PM
    Monday, April 16, 2012 5:01 PM