[DBAL-120] MySql platform getAlterTableSQL does not quote existing column names Created: 13/May/11 Updated: 19/Jun/11 Resolved: 19/Jun/11
|Reporter:||Devon Weller||Assignee:||Benjamin Eberlei|
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?
|Comment by Devon Weller [ 13/May/11 ]|
I also discovered a similar issue with key names. A second patch is attached.
|Comment by Benjamin Eberlei [ 19/Jun/11 ]|
This problem is a little more complicated, it will be fixed in DBAL-96 probably for 2.2