#33802: Q objects to match an empty string in CheckConstraint results in invalid
SQL using MySQL
-----------------------------+--------------------------------------
Reporter: Phil Gyford | Owner: nobody
Type: Bug | Status: closed
Component: Migrations | Version: 4.0
Severity: Normal | Resolution: worksforme
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+--------------------------------------
Changes (by Mariusz Felisiak):
* status: new => closed
* type: Uncategorized => Bug
* resolution: => worksforme
Comment:
Thanks for this ticket, however it works for me with MariaDB, MySQL, and
other built-in backends (I checked with Django 3.0, 3.1, 3.2, 4.0, 4.1,
and on the current `main` branch)
{{{
--
-- Create constraint sample_othermodel_firstname on model othermodel
--
ALTER TABLE `sample_othermodel` ADD CONSTRAINT
`sample_othermodel_firstname` CHECK (`firstname` = '');
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/33802#comment:1>
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/010701819196df77-51d5a8e1-3768-4665-93b1-769dc7284947-000000%40eu-central-1.amazonses.com.