Bug #93223
openWrong syntax for ALTER INDEX on PostgreSQL
0%
Description
Database compare generates statements like ALTER INDEX public_index_phash_freeindexuid2_idx RENAME TO "freeIndexUid_65098221"
. This results in an error:
/* ERROR: relation "public_index_phash_freeindexuid2_idx" does not exist */
The first argument needs to be quoted and case-sensitive like ALTER INDEX "public_index_phash_freeIndexUid2_idx" RENAME TO "freeIndexUid_65098221"
.
My PostgreSQL version is 12.5.
Updated by Jörn Wagner over 3 years ago
Further research suggests that this is an issue of doctrine/dbal: https://github.com/doctrine/dbal/blob/2.12.x/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php#L713
Updated by Stephan Großberndt about 3 years ago
- Related to Epic #90719: PostgreSQL related issues added
Updated by Stefan Bürk over 1 year ago
- Status changed from New to Accepted
- Assignee set to Stefan Bürk
Failed to reproduce it yet for a "changed" index. However, I get similar error when a field should be renamed (to zzz_) with postgres, and can reproduce this in v10/v11 and also main/v12. Thus, interessting that this happens with doctrine/dbal 2.x and 3.x (for renaming the field).
I would guess, that it boiles down to the workaround for postgres which is in the compareing stuff which has been added as fascadeds, and eventually the same for index.
So I will take this issue as granted and will look into it again try to fixing it.