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.
* status: new => closed
* type: Uncategorized => Bug
* component: Uncategorized => Migrations
* resolution: => duplicate
Comment:
Looks like a duplicate of #29778 which is fixed in Django 2.1.2.
--
Ticket URL: <https://code.djangoproject.com/ticket/29812#comment:1>
Comment (by Carl Johnson):
Upgrading fixed it. Thanks.
--
Ticket URL: <https://code.djangoproject.com/ticket/29812#comment:2>