This leads to the fact that if some of the migrations are removed or not
completely applied before the squash is added and there is a dependency on
the replacement migration, the user gets a 'NodeNotFoundError' where the
replacement migration that is not being applied because of line 206 is the
missing one.
This is very confusing to the user, raising a warning in line 208 would
inform the user that the squashed migration can not be applied because not
all the 'child' migrations are applied.
Had to debug into that to figure that out.
--
Ticket URL: <https://code.djangoproject.com/ticket/29063>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/29063#comment:1>
* owner: nobody => Jacob Walls
* status: new => assigned
Comment:
Somewhat similar to #23556, I think we can raise a more informative
`NodeNotFoundError`. Should have a patch soon, just need to toy with
whether backward migrations are also a problem.
--
Ticket URL: <https://code.djangoproject.com/ticket/29063#comment:2>
* has_patch: 0 => 1
Comment:
[https://github.com/django/django/pull/14643 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/29063#comment:3>
* needs_better_patch: 0 => 1
* needs_tests: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/29063#comment:4>
* needs_better_patch: 1 => 0
* needs_tests: 1 => 0
Comment:
On the PR Mariusz demonstrated several examples having to do with this
ticket's description where the error messages are sufficiently
informative. However, I think my test case is related to the original
poster's scenario (although it is hard to be certain), and shows Django
raising an improvable `NodeNotFoundError`.
Glad to give it another look, though, if you think I'm misreading the
original poster's use case. (To that end, Julian, I would be grateful if
you would be able to take a look at my suggested patch.)
--
Ticket URL: <https://code.djangoproject.com/ticket/29063#comment:5>
* type: Cleanup/optimization => Bug
Comment:
After Mariusz helpfully enumerated scenarios where the current messaging
is sufficient, we found really only a single case with an improvable
`NodeNotFoundError`, and I agree it would be better to just fix the
failure point than invest energy in a patch changing the exception
message:
[https://github.com/django/django/pull/14727 New PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/29063#comment:6>
--
Ticket URL: <https://code.djangoproject.com/ticket/29063#comment:7>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/29063#comment:8>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"910ecd1b8df7678f45c3d507dde6bcb1faafa243" 910ecd1]:
{{{
#!CommitTicketReference repository=""
revision="910ecd1b8df7678f45c3d507dde6bcb1faafa243"
Fixed #29063 -- Fixed migrate crash when specifying a name of partially
applied squashed migrations.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/29063#comment:9>