Opened 7 years ago
Last modified 7 years ago
#28875 closed Bug
SQLite: Creation of Index fails with '/' in app_label — at Initial Version
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
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.
Note:
See TracTickets
for help on using tickets.