#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: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Markus Holtermann):
Replying to [comment:15 Peter Thomassen]:
> Replying to [comment:13 Markus Holtermann]:
> > 4. Leave as-is; the first migration can be optimized anyway
>
> The first migration can trivially be optimized in this minimum example.
In our real example, we encountered the problem where migration 0003
interferes with migration 0011, with existing deployments somewhere in the
middle.
>
> In that case, 0003 and 0011 can be optimized/squashed more or less
easily for new deployments, but migration 0011 would have to be maintained
individually for those deployments which already have all migrations up to
that one applied. The result would be code duplication for "fresh" and
"existing" deployments, and -- if this problem reoccurs -- maybe even more
"squashed migration variations".
>
> So far, squashing was optional, and it would become a mandatory
mechanism, while producing code duplication in cases as described above.
In my opinion, that would be the least favorable option.
Yeah, that'd be true. As said, none of this is really ideal.
What we're doing here are unfortunately patches upon patches upon patches.
I'd really like to move onto the "right" way.
--
Ticket URL: <https://code.djangoproject.com/ticket/30966#comment:17>
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.26abf56100af9d150c411a2220192668%40djangoproject.com.