summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorSimon Charette <charette.s@gmail.com>2024-07-23 00:33:31 -0400
committerSarah Boyce <42296566+sarahboyce@users.noreply.github.com>2024-07-25 07:54:19 +0200
commit41d8ef18ac2d983bea5ef919615687308ffe41c1 (patch)
treef5bc01dbdd71eeeddf30800c67fbf27f5429a71d /docs
parent68f65630c6745f119a0e96ce12c9324bc258ef2d (diff)
[5.0.x] Fixed #35625 -- Fixed a crash when adding a field with db_default and check constraint.
This is the exact same issue as refs #30408 but for creating a model with a constraint containing % escapes instead of column addition. All of these issues stem from a lack of SQL and parameters separation from the BaseConstraint DDL generating methods preventing them from being mixed with other parts of the schema alteration logic that do make use of parametrization on some backends (e.g. Postgres, MySQL for DEFAULT). Prior to the addition of Field.db_default and GeneratedField in 5.0 parametrization of DDL was never exercised on model creation so this is effectively a bug with db_default as the GeneratedField case was addressed by refs #35336. Thanks Julien Chaumont for the report and Mariusz Felisiak for the review. Backport of f359990e4909db8722820849d61a6f5724338723 from main.
Diffstat (limited to 'docs')
-rw-r--r--docs/releases/5.0.8.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/releases/5.0.8.txt b/docs/releases/5.0.8.txt
index 1037b78f75..7bdb5488b2 100644
--- a/docs/releases/5.0.8.txt
+++ b/docs/releases/5.0.8.txt
@@ -15,3 +15,7 @@ Bugfixes
* Fixed a regression in Django 5.0 where ``ModelAdmin.action_checkbox`` could
break the admin changelist HTML page when rendering a model instance with a
``__html__`` method (:ticket:`35606`).
+
+* Fixed a crash when creating a model with a ``Field.db_default`` and a
+ ``Meta.constraints`` constraint composed of ``__endswith``, ``__startswith``,
+ or ``__contains`` lookups (:ticket:`35625`).