You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If an index is created with quotes in an Oracle database, Doctrine fails to generate statements with the correct index name.
How to reproduce
Create an index with a quoted name:
CREATE INDEX "idx_test_col" ON "test" ("col")
Then, try to rename or drop the index:
$table->renameIndex('"idx_test_col"', '"idx_test_type"');
// -> ALTER INDEX idx_test_col RENAME TO "idx_test_type"
$table->dropIndex('"idx_test_col"');
// -> DROP INDEX idx_test_col
Because Oracle is case-sensitive and converts unquoted identifiers to upper-case automatically, these statements result in a "index not found" error.
Expected behaviour
Quoted index names must be used in the generated SQL statements:
$table->renameIndex('"idx_test_col"', '"idx_test_type"');
// -> ALTER INDEX "idx_test_col" RENAME TO "idx_test_type"
$table->dropIndex('"idx_test_col"');
// -> DROP INDEX "idx_test_col"
The text was updated successfully, but these errors were encountered:
Bug Report
Summary
If an index is created with quotes in an Oracle database, Doctrine fails to generate statements with the correct index name.
How to reproduce
Create an index with a quoted name:
Then, try to rename or drop the index:
Because Oracle is case-sensitive and converts unquoted identifiers to upper-case automatically, these statements result in a "index not found" error.
Expected behaviour
Quoted index names must be used in the generated SQL statements:
The text was updated successfully, but these errors were encountered: