Skip to content

Loading…

DBAL-120: MySql platform getAlterTableSQL does not quote existing column names #1145

Closed
doctrinebot opened this Issue · 5 comments

2 participants

@doctrinebot

Jira issue originally created by user deweller:

When creating alter table SQL, the MySqlPlatform class does not quote names for columns of an existing table when building a CHANGE query. This can cause SQL errors.

It creates queries like this:

ALTER TABLE my_table CHANGE key key INTVARCHAR(255) DEFAULT '' NOT NULL';

Attached is a patch to fix this.

As an aside, is this the best way to contribute a patch? Or is a GitHub pull request better?

@doctrinebot

Comment created by deweller:

I also discovered a similar issue with key names. A second patch is attached.

@doctrinebot

Comment created by @beberlei:

This problem is a little more complicated, it will be fixed in DBAL-96 probably for 2.2

@doctrinebot

Issue was closed with resolution "Duplicate"

@doctrinebot doctrinebot added the Bug label
@beberlei beberlei was assigned by doctrinebot
@doctrinebot doctrinebot added this to the 2.0.4 milestone
@doctrinebot doctrinebot closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.