#34856: Running tests with historical migrations that contain index together
fails
with TypeError.
-------------------------------+--------------------------------------
Reporter: Sage Abdullah | Owner: nobody
Type: Bug | Status: closed
Component: Migrations | Version: dev
Severity: Normal | Resolution: invalid
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Comment (by Andrés Reverón Molina):
Hi, I'm in the process of upgrading a project from Django 4.2.x to 5.1.x
and I'm facing this issue.
Every instance of {{{ Meta.index_together }}} has already been updated to
use {{{ Meta.indexes }}}, but there are still some {{{ AlterIndexTogether
}}} in historical migrations, which happily crash with a
{{{ TypeError: 'class Meta' got invalid attribute(s): index_together }}}
error.
Unfortunately squashing migrations does not help, as {{{
AlterIndexTogether }}} is still there after the migrations have been
squashed.
Is there a recommended workaround to this? Maybe what is suggested here
https://code.djangoproject.com/ticket/35679#comment:1 ?
--
Ticket URL: <https://code.djangoproject.com/ticket/34856#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 visit
https://groups.google.com/d/msgid/django-updates/010701932b0220f6-27f96a5c-b3e9-49ed-bfd4-7e6a4248487d-000000%40eu-central-1.amazonses.com.