Opened 8 weeks ago

Closed 8 weeks ago

#35749 closed Bug (duplicate)

AlterIndexTogether raising TypeError: 'class Meta' got invalid attribute(s): index_together

Reported by: Dishen Wang Owned by:
Component: Migrations Version: 5.1
Severity: Normal Keywords: AlterIndexTogether, index_together
Cc: Dishen Wang Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

According to the documentation: "The AlterIndexTogether migration operation is now officially supported only for pre-Django 4.2 migration files. For backward compatibility reasons, it’s still part of the public API, and there’s no plan to deprecate or remove it, but it should not be used for new migrations. Use AddIndex and RemoveIndex operations instead." But when running make migrate it gave error TypeError: 'class Meta' got invalid attribute(s): index_together. Is this an issue or should am I misunderstanding the problem?

Change History (1)

comment:1 by Sarah Boyce, 8 weeks ago

Resolution: duplicate
Status: newclosed

Duplicate of #34856, #35679

The 4.2 release notes say the following:

Next, consider squashing migrations to remove index_together from historical migrations.

Note: See TracTickets for help on using tickets.
Back to Top