Fix expected index SQL for DESC on MySQL 5.7.

Review Request #14924 — Created March 17, 2026 and updated — Latest diff uploaded

Information

Django Evolution
master

Reviewers

While running tests for other issues, I discovered one failing test on
MySQL 5.7 with Django 4.1. The issue here is just one of test
expectations-- It turns out that Django 4.1 introduced a check for
supports_index_column_ordering in Index.create_sql(), which omits
DESC when the database doesn't support it (such as MySQL 5.7). Older
Django versions always emitted DESC regardless.

The test expectation now accounts for this by only omitting DESC on
Django 4.1+ when the feature is unsupported.

Ran tests against all combinations of Django+MySQL.

Commits

Files