Add a new test for removing index_together.

Review Request #14742 — 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. A previous change updated signature
calculation and existing unit tests for this, but one thing I wanted to
make sure continued to work was an evolution which removes
index_together and adds indexes, even when running on Django>=5.1.

This change adds a test which will manually modify the signature (on
affected versions) to simulate this case, and verify that we end up
correctly modifying the signature while generating empty SQL (since
there's no change in the actual indexes).

Ran new test on all versions and database types.

Summary ID
Add a new test for removing index_together.
Django 5.1 removes support for `Meta.index_together` in favor of just including these in `Meta.indexes`. A previous change updated signature calculation and existing unit tests for this, but one thing I wanted to make sure continued to work was an evolution which removes `index_together` and adds `indexes`, even when running on Django>=5.1. This change adds a test which will manually modify the signature (on affected versions) to simulate this case, and verify that we end up correctly modifying the signature while generating empty SQL (since there's no change in the actual indexes). Testing Done: Ran new test on all versions and database types.
lvszoxpknytzmulptuwmnotzvtnzkwou
Description From Last Updated

This can use -> None now.

chipx86chipx86
Checks run (2 succeeded)
flake8 passed.
JSHint passed.
chipx86
  1. 
      
  2. Show all issues

    This can use -> None now.

    1. I'm going to have future changes that add type annotations. For this one I'd like to just match the surrounding style.

  3.