From fead2dd52303505f30007df5e3c198b48b3ce9ae Mon Sep 17 00:00:00 2001 From: Simon Charette Date: Tue, 2 Apr 2024 16:33:31 -0400 Subject: [5.0.x] Fixed #35336 -- Addressed crash when adding a GeneratedField with % literals. A longer term solution is likely to have a better separation of parametrized DDL altogether to handle checks, constraints, defaults, and generated fields but such a change would require a significant refactor that isn't suitable for a backport. Thanks Adrian Garcia for the report. Backport of 888b9042b3598bab6557c62de82505eec9ea62ed from main --- docs/releases/5.0.4.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'docs') diff --git a/docs/releases/5.0.4.txt b/docs/releases/5.0.4.txt index 6872d5998a..6b922b09c0 100644 --- a/docs/releases/5.0.4.txt +++ b/docs/releases/5.0.4.txt @@ -24,3 +24,7 @@ Bugfixes * Fixed a crash in Django 5.0 when performing queries involving table aliases and lookups on a ``GeneratedField`` of the aliased table (:ticket:`35344`). + +* Fixed a bug in Django 5.0 that caused a migration crash when adding a + ``GeneratedField`` relying on the ``__contains`` or ``__icontains`` + lookups or using a ``Value`` containing a ``"%"`` (:ticket:`35336`). -- cgit v1.3