#30408: CheckConstraint with lookup using LIKE & % crash on Oracle and PostgreSQL. -------------------------------------+------------------------------------- Reporter: David Sanders | Owner: Simon | Charette Type: Bug | Status: closed Component: Database layer | Version: 2.2 (models, ORM) | Severity: Release blocker | Resolution: fixed Keywords: | Triage Stage: Ready for | checkin Has patch: 1 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+------------------------------------- Comment (by Sarah Boyce <42296566+sarahboyce@…>):
In [changeset:"f359990e4909db8722820849d61a6f5724338723" f359990e]: {{{#!CommitTicketReference repository="" revision="f359990e4909db8722820849d61a6f5724338723" 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. }}} -- Ticket URL: <https://code.djangoproject.com/ticket/30408#comment:8> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/01070190e86f7a93-b31746c5-0825-4c33-8e80-f20c1700f26c-000000%40eu-central-1.amazonses.com.