Skip to content
Snippets Groups Projects
Commit 19ce6696 authored by Stefan Bürk's avatar Stefan Bürk
Browse files

[BUGFIX] Use correct column and index name caseing for PostgresSQL

Doctrine DBAL uses lowercased array index names for
table or index names, which has been used to make
RENAME DDL statements. Due to the lack of having the
old information correctly in place, this leads to
invalid RENAME DDL statements for tables or indexes
having upper case characters in the name. That is a
edgecase for PostgreSQL and SQLite due to custom
index name handling based on that array key.

This change modifies the ConnectionMigrator to use
correct casing for column and index naming in case
table or column needs to be renamed.

That allows, that following correct DDL statements
are now created:

  ALTER INDEX "freeIndexUid_65098221"
    RENAME TO "customFreeIndexUid_6dedc8fa"

  ALTER TABLE "index_phash"
    RENAME COLUMN "freeIndexSetId" TO "zzz_deleted_freeIndexSetId"

in case the `EXT:indexed_search/ext_tables.sql` is changed
for table `index_phash` to drop the `freeIndexSetId` column
by commenting it out or remove it and renaming `freeIndexUid`
index to `customFreeIndexUid`. [1]

[1] https://review.typo3.org/c/Packages/TYPO3.CMS/+/84576/3/typo3/sysext/indexed_search/ext_tables.sql

Resolves: #93223
Releases: main, 12.4
Change-Id: I195ad021b8826be59a3ae78a926a396528ca0c66
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/84698


Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
parent c2be8b18
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment