Skip to content
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

Oracle platform fails on quoted indexes #6565

Open
aimeos opened this issue Oct 21, 2024 · 0 comments
Open

Oracle platform fails on quoted indexes #6565

aimeos opened this issue Oct 21, 2024 · 0 comments

Comments

@aimeos
Copy link
Contributor

aimeos commented Oct 21, 2024

Bug Report

Q A
Version 3.9/4.2

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:

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"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants