#33192: It is not possible to use a custom lookup/transorm in a CheckConstraint
-------------------------------------+-------------------------------------
Reporter: Fabien MICHEL | Owner: nobody
Type: Bug | Status: closed
Component: Database layer | Version: 3.1
(models, ORM) | Resolution:
Severity: Normal | worksforme
Keywords: lookup, transform, | Triage Stage:
CheckContraint, migrate | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Fabien MICHEL):
It is all clear for me, thanks you. Shouldn't we add a warning about this
in CheckConstraint documentation ?
Here is a proposal:
{{{
.. note::
If you use a :doc:`custom lookup </howto/custom-lookups>` in
CheckContraint
expression you will have to ensure the expected custom lookup is
registered
before the migration run. Therefore, the migration framework doesn't
detect
change at the resulting SQL of the expression. It is up to you to keep
referenced lookup coherent with migration state.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/33192#comment:9>
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/071.1e9bce9a5c05131d9788fcf7ad2d45a4%40djangoproject.com.