#30966: Migration crashes due to foreign key issue, depending on otherwise
irrelevant order on MySQL.
-------------------------------------+-------------------------------------
Reporter: Peter Thomassen | Owner: Hasan
| Ramezani
Type: Bug | Status: assigned
Component: Migrations | Version: master
Severity: Normal | Resolution:
Keywords: migration mySQL | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Simon Charette):
Hasan, the solution you proposed will likely address this issue but the
fact multiple instances of `Options` for the same model classes are mixed
in there is likely a symptom or a larger issue.
I'm not sure of the origin of it but this can only happen when model from
different `apps` boundaries are mixed together which should be disallowed
as it will cause all sort of weird issues. What I mean by that is that
there's likely ''something'' that creates models from a migration project
state and have ''real'' models reference them or vice-versa. You can
assert this doesn't happen by making sure each `model._meta.apps is
self.apps`.
In short I think this solution will only temporarily hide a much larger
problem.
--
Ticket URL: <https://code.djangoproject.com/ticket/30966#comment:6>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/072.cf01efbf92a3baa029bfbaaedd31c377%40djangoproject.com.