File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
xyz-jobs/xyz-job-steps/src/main/java/com/here/xyz/jobs/steps/impl
xyz-util/src/main/java/com/here/xyz/util/db/pg Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,12 @@ public void setIndexWhiteList(List<Index> indexWhiteList) {
5959 }
6060
6161 public DropIndexes withIndexWhiteList (List <Index > indexWhiteList ) {
62+ for (Index index : indexWhiteList ) {
63+ //ensure BWC for spaces created with old index definitions
64+ if (index instanceof OnDemandIndex onDemandIndex && onDemandIndex .definitionGotTransformed ()) {
65+ onDemandIndex .setPropertyPath (onDemandIndex .extractLogicalPropertyPath ());
66+ }
67+ }
6268 setIndexWhiteList (indexWhiteList );
6369 return this ;
6470 }
Original file line number Diff line number Diff line change @@ -232,7 +232,9 @@ public boolean definitionGotTransformed() {
232232 @ Override
233233 public String getIndexName (String tableName ) {
234234 // Take the first 8 characters of md5 hash of the property path
235- String shortMd5 = DigestUtils .md5Hex (propertyPath ).substring (0 , 7 );
235+ String shortMd5 = DigestUtils .md5Hex (
236+ definitionGotTransformed () ? extractLogicalPropertyPath () : propertyPath
237+ ).substring (0 , 7 );
236238
237239 return idxPrefix + tableName + "_" + shortMd5 + "_m" ;
238240 }
You can’t perform that action at this time.
0 commit comments