From f36239fa190c77883d4c09ad18da63278c1a6cf4 Mon Sep 17 00:00:00 2001 From: Simon Charette Date: Mon, 29 Apr 2019 22:49:45 -0400 Subject: [2.2.x] Fixed #30408 -- Fixed crash when adding check constraints with LIKE operator on Oracle and PostgreSQL. The LIKE operator wildcard generated for contains, startswith, endswith and their case-insensitive variant lookups was conflicting with parameter interpolation on CREATE constraint statement execution. Ideally we'd delegate parameters interpolation in DDL statements on backends that support it but that would require backward incompatible changes to the Index and Constraint SQL generating methods. Thanks David Sanders for the report. Backport of a8b3f96f6acfa082f99166e0a1cfb4b0fbc0eace from master --- docs/releases/2.2.1.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'docs') diff --git a/docs/releases/2.2.1.txt b/docs/releases/2.2.1.txt index 9f241b83e9..90c9a06e79 100644 --- a/docs/releases/2.2.1.txt +++ b/docs/releases/2.2.1.txt @@ -70,3 +70,7 @@ Bugfixes * Fixed a regression in Django 2.2 where changes were not reliably detected by auto-reloader when using ``StatReloader`` (:ticket:`30323`). + +* Fixed a migration crash on Oracle and PostgreSQL when adding a check + constraint with a ``contains``, ``startswith``, or ``endswith`` lookup (or + their case-insensitive variant) (:ticket:`30408`). -- cgit v1.3