#29812: AlterUniqueTogether creates invalid SQL for app with hyphen in name
-----------------------------------------+--------------------------------
               Reporter:  Carl Johnson   |          Owner:  nobody
                   Type:  Uncategorized  |         Status:  new
              Component:  Uncategorized  |        Version:  2.1
               Severity:  Normal         |       Keywords:  migrations SQL
           Triage Stage:  Unreviewed     |      Has patch:  0
    Needs documentation:  0              |    Needs tests:  0
Patch needs improvement:  0              |  Easy pickings:  0
                  UI/UX:  0              |
-----------------------------------------+--------------------------------
 Background:

 I am using Django 2.1.1 with Postgresql. I attempted to create a
 unique_together field for an app with the name "mencken-admin".

 Result:

 I got a traceback ending with


 {{{
 django.db.utils.ProgrammingError: syntax error at or near "-"
 LINE 1: ...LE "mencken-admin_sitepage" ADD CONSTRAINT mencken-admin_sit...

 }}}

 And then a little carrot (can't type it in the bug system) indicating that
 the error was the hyphen in mencken-admin_sitepage.

 I believe the problem is that the constraint name needs to be escaped
 somehow.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/29812>
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/055.93c1778aa770d9ff778e55fd1541c79f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to