Opened 7 years ago
Last modified 7 years ago
#28875 closed Bug
SQL: Creation of Index fails with '/' in app_label — at Version 1
Reported by: | Jens L. | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | 2.0 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
Django 2's creation of SQLite indicies doesn't escape the index name, which causes issues when you use for example '/' in your app_labels.
Offending file is db/backends/sqlite3/schema.py , line 18.
If said line is swapped with this:
sql_create_unique = "CREATE UNIQUE INDEX \"%(name)s\" ON %(table)s (%(columns)s)"
creation of indices works fine.
Update: This also happens on MySQL (tested on Python 3.5.3, Django 2.0, PyMySQL 0.7.11
Change History (1)
comment:1 by , 7 years ago
Description: | modified (diff) |
---|---|
Summary: | SQLite: Creation of Index fails with '/' in app_label → SQL: Creation of Index fails with '/' in app_label |
Note:
See TracTickets
for help on using tickets.