1
0
mirror of https://github.com/django/django.git synced 2025-10-24 22:26:08 +00:00

Fixed #36358 -- Corrected introspection of composite primary keys on SQLite.

Previously, any first field of a composite primary key with type
`INTEGER` was incorrectly introspected as an `AutoField` due to SQLite
treating `INTEGER PRIMARY KEY` as an alias for the `ROWID`.

This change ensures that integer fields in composite PKs are not
mistaken for auto-incrementing fields.

Thanks Jacob Walls and Sarah Boyce for the reviews.
This commit is contained in:
Simon Charette
2025-04-28 23:35:04 -04:00
committed by nessita
parent 4c75858135
commit 07100db6f4
3 changed files with 17 additions and 11 deletions

View File

@@ -55,3 +55,7 @@ Bugfixes
* Fixed a regression in Django 5.2 that caused a crash when using ``update()``
on a ``QuerySet`` filtered against a related model and including references
to annotations through ``values()`` (:ticket:`36360`).
* Fixed a bug in composite primary key introspection that caused
``IntegerField`` to be wrongly identified as ``AutoField`` on SQLite
(:ticket:`36358`).