#34525: index_together warning after migration to new style -------------------------------------+------------------------------------- Reporter: Mateusz Legięcki | Owner: nobody Type: Bug | Status: new Component: Database layer | Version: 4.2 (models, ORM) | Severity: Release blocker | Resolution: Keywords: index_together, | Triage Stage: Accepted warning | Has patch: 1 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 1 Easy pickings: 0 | UI/UX: 0 -------------------------------------+-------------------------------------
Comment (by Simon Charette): I think the situation here is slightly different than with `CommaSeparatedIntegerField` where we [https://github.com/django/django/blob/5a6d4d3bfde07daab9777545694beb014c832264/django/db/models/fields/__init__.py#L1254 used system checks to allow historical migrations to keep referencing such fields]. With the planed complete removal of `index_together` support in Django 5.1 I believe that using a system check instead of deprecation warning would be doing a disservice to users as that would convey that a shim is going to remain in place for releases to come (current situation with `CommaSeparatedIntegerField`). Users will have to squash or edit their migration to support the next release of Django, it is inevitable. I think that the case of `ForeignKey.on_delete` promotion to a required kwarg in is a better analogous to the situation we are facing here (#21127) which required manual adjustments of historic migrations #28677 [https://github.com/django/django/commit/491eb56fd4dea10248ccced90c31ed64152d09cb which didn't seem contentious at the time]? -- Ticket URL: <https://code.djangoproject.com/ticket/34525#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 django-updates+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/01070187d416afbb-5d87febd-4c19-48ce-a2d4-f244910a6aa5-000000%40eu-central-1.amazonses.com.