Files
Marcelo Dares ea23136288 changes
2026-04-29 01:15:50 +02:00

9 lines
387 B
SQL

-- RenameIndex (safe guard for environments where the old truncated index never existed)
DO $$
BEGIN
IF to_regclass('"OfficialNormativeSuggestion_stateCode_municipalityCode_createdA"') IS NOT NULL THEN
ALTER INDEX "OfficialNormativeSuggestion_stateCode_municipalityCode_createdA"
RENAME TO "OfficialNormativeSuggestion_stateCode_municipalityCode_crea_idx";
END IF;
END $$;