DDC-2563: orm:schema-tool:update generates ALTER TABLE tablename without backquoting tablename with #3291

Closed
doctrinebot opened this Issue Jul 22, 2013 · 2 comments

2 participants

@doctrinebot

Jira issue originally created by user iterra:

I have an entity "Index"
Running doctrine orm:schema-tool:update using CLI generates following

ALTER TABLE Index ADD Merchant_Id BIGINT DEFAULT NULL

Note there are no backquotes around Index, should be like this:

ALTER TABLE Index ADD Merchant_Id BIGINT DEFAULT NULL

Naturally SQL fails due to the use of mysql token word as a table name.
Manual workarounds exist, but all DDL should really use proper quotes.

@doctrinebot

Comment created by @ocramius:

The ORM comes with quoting strategies to be used when you don't use ANSI compliant identifier names. Alternatively, wrap the entity table name with mysql-style identifier delimiter ticks ("`") in your mappings

@doctrinebot

Issue was closed with resolution "Invalid"

@Ocramius Ocramius was assigned by doctrinebot Dec 6, 2015
@doctrinebot doctrinebot closed this Dec 6, 2015
@doctrinebot doctrinebot added the Bug label Dec 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment