[5.2.x] Fixed #36357 -- Skipped unique_together in inspectdb output for composite primary keys.

Thanks to Baptiste Mispelon for the report and quick fix, and to Simon
Charette and Jacob Walls for the reviews.

Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>

Backport of 66f9eb0ff1 from main.
This commit is contained in:
Baptiste Mispelon 2025-04-28 09:48:12 +02:00 committed by Natalia
parent ec73fd6746
commit 1367a197dd
3 changed files with 10 additions and 1 deletions

View file

@ -59,3 +59,7 @@ Bugfixes
* Fixed a bug in composite primary key introspection that caused
``IntegerField`` to be wrongly identified as ``AutoField`` on SQLite
(:ticket:`36358`).
* Fixed a bug in Django 5.2 that caused a redundant ``unique_together``
constraint to be generated for composite primary keys when using
:djadmin:`inspectdb` (:ticket:`36357`).