Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#21692 closed Bug (fixed)

'CREATE TABLE' of initial migration doesn't quote table name

Reported by: ramiro Owned by: Ramiro Morales <cramm0@…>
Component: Migrations Version: master
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


If yo add a model whose table name is e.g. 'select' you get this error when running the corresponding migration:


LINE 1: CREATE TABLE select ("when" varchar(1) NOT NULL PRIMARY KEY)


near "select": syntax error

Change History (5)

comment:1 Changed 3 years ago by ramiro

  • Has patch set
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 3 years ago by charettes

  • Triage Stage changed from Accepted to Ready for checkin

Patch makes sense and passes tests on Py2/3 SQLite/Postgres

comment:3 Changed 3 years ago by Ramiro Morales <cramm0@…>

  • Owner set to Ramiro Morales <cramm0@…>
  • Resolution set to fixed
  • Status changed from new to closed

In 3efd1b8b939c0a600b2d63317d224ebaab766f01:

Fixed #21692 -- Quote table name when creating it.

comment:4 Changed 3 years ago by Ramiro Morales <cramm0@…>

In 61cfcec5b7d47232a1d6facbde71d4cca35986eb:

Merge pull request #2120 from ramiro/schema-creation-quoting

Fixed #21692 -- Quote table name when creating it.

comment:5 Changed 3 years ago by Ramiro Morales <cramm0@…>

In 3518e9ec1f23f0278aefea6738f9d49eb7d4fe52:

Amend test table name so it doesn't clash.

Refs #21692 and 3efd1b8b939.

Note: See TracTickets for help on using tickets.
Back to Top