#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 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. Thanks a LOT for your time, and for thinking though this whole thing! -- Ticket URL: <https://code.djangoproject.com/ticket/30966#comment:15> 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 django-updates+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/072.e57cd9ff2a51d1a8996dccafae5ab6fd%40djangoproject.com.