Details
Description
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?
Issue Links
- duplicates
-
DBAL-96
Make approach towards identifier quoting consistent
-
Activity
Devon Weller
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Attachment | quote-mysql-change-keyname.patch [ 10993 ] |
Benjamin Eberlei
made changes -
Benjamin Eberlei
made changes -
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Resolution | Duplicate [ 3 ] |
Benjamin Eberlei
made changes -
| Workflow | jira [ 12636 ] | jira-feedback2 [ 17720 ] |
Benjamin Eberlei
made changes -
| Workflow | jira-feedback2 [ 17720 ] | jira-feedback3 [ 20075 ] |
This list may be incomplete, as errors occurred whilst retrieving source from linked applications:
- Request to http://www.doctrine-project.org/fisheye/ failed: Error in remote call to 'FishEye 0 (http://www.doctrine-project.org/fisheye/)' (http://www.doctrine-project.org/fisheye) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={query=DBAL-120, expand=changesets[-21:-1].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)
I also discovered a similar issue with key names. A second patch is attached.