From ec73fd67466e0e4841d9ecd0f217c02ce842d860 Mon Sep 17 00:00:00 2001 From: Simon Charette Date: Mon, 28 Apr 2025 23:35:04 -0400 Subject: [5.2.x] 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. Backport of 07100db6f46255ec6ef70b860495f977473684d6 from main. --- docs/releases/5.2.1.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'docs') diff --git a/docs/releases/5.2.1.txt b/docs/releases/5.2.1.txt index 19d14bbddf..8ec4d58a92 100644 --- a/docs/releases/5.2.1.txt +++ b/docs/releases/5.2.1.txt @@ -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`). -- cgit v1.3