However, let's say we have another app Y, with migrations up to `Y.0004`,
and it so happens that `X.0003_b` depends on `Y.0004` (in addition to
depending on `X.0002`).
In this situation, `makemigrations --merge` includes every operation in
every migration of app `Y` in its list of operations that are part of the
`X.0003_b` branch. This is very confusing, as it makes that branch appear
much bigger than it actually is. Despite the dependency, the migrations in
app `Y` are not relevant to determining whether the merge is safe, because
in general it is an assumption of the migrations framework that migrations
in different apps do not conflict with one another (which is we allow one
"head" migration per app, not per project).
I think that `makemigrations --merge` should restrict its search for
operations in each branch to the current app only, and not display
operations from a different app.
--
Ticket URL: <https://code.djangoproject.com/ticket/24755>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
Ticket URL: <https://code.djangoproject.com/ticket/24755#comment:1>
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/24755#comment:2>
* owner: nobody => MarkusH
* status: new => assigned
* has_patch: 0 => 1
Comment:
PR: https://github.com/django/django/pull/5121
--
Ticket URL: <https://code.djangoproject.com/ticket/24755#comment:3>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/24755#comment:4>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"0271a11ba5df58b449a3f968ec57fb1a090c5726" 0271a11]:
{{{
#!CommitTicketReference repository=""
revision="0271a11ba5df58b449a3f968ec57fb1a090c5726"
Fixed #24755 -- Hid operations from dependency apps when merging
migrations
Thanks Carl Meyer for the report and Tim Graham for the review.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/24755#comment:5>