-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Quote the name of an index in the create table statement. #723
Conversation
@digilist needs a test case first |
db9ebb0
to
08bab83
Compare
Yes, sry, you are absolutely right. I added the tests. |
$table->addIndex(array('column1'), '`key`'); | ||
|
||
$sql = $this->_platform->getCreateTableSQL($table); | ||
$this->assertEquals($this->getQuotedNameInIndexSQL(), $sql); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to create an abstract protected getQuotedNameInIndexSQL()
method in this class
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The method is declared in line 537. Or do I misinterpret your comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah sorry didn't see that line. Nevermind then.
Quote the name of an index in the create table statement.
@digilist thanks! Backported to 2.5 and 2.4. |
Currently, in the method
getCreateTableSQL
all names of tables, columns and foreign keys are quoted but not the names of indexes. This PR fixes this problem.It would be very nice, if this fix can be backported into at least the 2.4 branch :)