Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#21692 closed Bug (fixed)

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

Reported by: Ramiro Morales Owned by: Ramiro Morales <cramm0@…>
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 Ramiro Morales, 10 years ago

Has patch: set
Triage Stage: UnreviewedAccepted

comment:2 by Simon Charette, 10 years ago

Triage Stage: AcceptedReady for checkin

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

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

Owner: set to Ramiro Morales <cramm0@…>
Resolution: fixed
Status: newclosed

In 3efd1b8b939c0a600b2d63317d224ebaab766f01:

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

comment:4 by Ramiro Morales <cramm0@…>, 10 years ago

In 61cfcec5b7d47232a1d6facbde71d4cca35986eb:

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

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

comment:5 by Ramiro Morales <cramm0@…>, 10 years ago

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