#21692 closed Bug (fixed)
'CREATE TABLE' of initial migration doesn't quote table name
| Reported by: | Ramiro Morales | Owned by: | |
|---|---|---|---|
| Component: | Migrations | Version: | dev |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Ready for checkin | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
If yo add a model whose table name is e.g. 'select' you get this error when running the corresponding migration:
Postgres:
LINE 1: CREATE TABLE select ("when" varchar(1) NOT NULL PRIMARY KEY)
SQLite:
near "select": syntax error
Change History (5)
comment:1 by , 12 years ago
| Has patch: | set |
|---|---|
| Triage Stage: | Unreviewed → Accepted |
comment:2 by , 12 years ago
| Triage Stage: | Accepted → Ready for checkin |
|---|
Patch makes sense and passes tests on Py2/3 SQLite/Postgres
comment:3 by , 12 years ago
| Owner: | set to |
|---|---|
| Resolution: | → fixed |
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
PR: https://github.com/django/django/pull/2120