Re: [Django] #33802: Q objects to match an empty string in CheckConstraint results in invalid SQL using MySQL

2022-06-23 Thread Django
#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
-+--

Comment (by Phil Gyford):

 Fair enough!

 Very strange. I’ve tried several variations and always had the same error,
 but I’ve only tried it with this one MariaDB-using project, and one other
 that used SQLite (that didn’t have the error).

-- 
Ticket URL: 
Django 
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/0107018191c0beb7-0c4fd939-2a7c-46c3-8f87-db803da2024f-00%40eu-central-1.amazonses.com.


Re: [Django] #33802: Q objects to match an empty string in CheckConstraint results in invalid SQL using MySQL (was: Using a Q object to match an empty string in CheckConstraint results in invalid SQL

2022-06-23 Thread Django
#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: 
Django 
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/010701819196df77-51d5a8e1-3768-4665-93b1-769dc7284947-00%40eu-central-1.amazonses.com.