Skip to content

Migrations: Team environments can break rebuilds #996

Closed as not planned
Closed as not planned

Description

@bricelam

Imagine the following scenario.

  1. DevA scaffolds a migration adding ColumnX from Table1
  2. DevB scaffolds a migration that rebuilds Table1
  3. DevA commits
  4. DevB pulls with no conflicts in the model snapshot and commits
  5. DevC pulls and runs Apply-Migration

When Table1 is rebuilt, it will not contain ColumnX. This is because when DevB's migration was scaffolded, it did not know about ColumnX.

This will be true whether we rebuild by "binding" to the model or by scaffold an imperative table rebuild.

Activity

  1. rowanmiller commented on Oct 31, 2014

    @rowanmiller
    Contributor

    We should revisit the idea of keeping a Git style tree of migrations, we may not need to try and solve this issue but we could warn when we detect multiple heads and let devs know that they need to verify things work as expected. It seems like the cases where you hit issues like this are way less now that we have the combined snapshot.

  2. rowanmiller commented on Nov 10, 2014

    @rowanmiller
    Contributor

    Team Triage: We're making a lot of progress on team environments in EF Core and it seems like it only falls down in edge cases now. We should come back and look at these in the future though and see if we can do something better.

  3. added this to the Backlog milestone on Nov 10, 2014
  4. ajcvickers commented on Feb 17, 2018

    @ajcvickers
    Contributor

    Leaving on the backlog to consider what we can do with regards to squashing, rebasing, etc of migrations. See also #2167 and #2174.

  5. 1 remaining item

  6. added this to the 5.0.0 milestone on Nov 15, 2019
  7. modified the milestone: 5.0.0 on Mar 10, 2020
  8. removed this from the 5.0.0 milestone on Mar 12, 2020
  9. added theissue type on Jun 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions