Review Request #11085 — Created July 17, 2020 and submitted
Django 2.0 had a bug when generating SQL for creating a unique index
where the name wasn't being quoted. This could result in statements with
syntax errors, and impacted some unit tests.
This change adds a runtime compatibility patch that overrides Django
_create_unique_sql()that adds quoting, if code is detected that
would skip the quoting.
This won't impact any version of Django that has the correct quoting
Unit tests pass on Django 2.0.
Improved the check to avoid an issue that could come up on Django 1.11.
Revision 2 (+116 -2)