Fish Trophy

david got a fish trophy!

Fish Trophy

Update for removed index_together field.

Review Request #14741 — Created Dec. 22, 2025 and updated

Information

Django Evolution
master

Reviewers

Django 5.1 removes support for Meta.index_together in favor of just
including these in Meta.indexes. Any metadata classes that still
include this unconditionally will cause a crash when attempting to
finalize the model classes during initialization.

We already had a supports_index_together flag, so we just needed to
add some conditionals.

A later change will add one additional test that runs on all versions
for verifying that an evolution which removes index_together and adds
indexes continues to run correctly even on Django>=5.1.

Ran unit tests.

Summary ID
Update for removed index_together field.
Django 5.1 removes support for `Meta.index_together` in favor of just including these in `Meta.indexes`. Any metadata classes that still include this unconditionally will cause a crash when attempting to finalize the model classes during initialization. We already had a `supports_index_together` flag, so we just needed to add some conditionals. A later change will add one additional test that runs on all versions for verifying that an evolution which removes `index_together` and adds `indexes` continues to run correctly even on Django>=5.1. Testing Done: Ran unit tests.
xovssqympkwwxkupvrnwkzpltussqymv
Checks run (2 succeeded)
flake8 passed.
JSHint passed.
chipx86
  1. Ship It!
  2. 
      
maubin
  1. Ship It!
  2.