Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: 78e241d6 by Tony Chemit at 2020-05-26T11:20:08+02:00 Migration des trip.comment vers trip.homeid incorrecte - Closes #1492 - - - - - 1 changed file: - persistence/src/main/java/fr/ird/observe/entities/migration/DataSourceMigrationForVersion_7_6.java Changes: ===================================== persistence/src/main/java/fr/ird/observe/entities/migration/DataSourceMigrationForVersion_7_6.java ===================================== @@ -72,7 +72,7 @@ public class DataSourceMigrationForVersion_7_6 extends MigrationVersionResource // Must be a ## starting comment continue; } - String homeId = comment.substring(1, endIndex - 1); + String homeId = comment.substring(1, endIndex); String newComment = endIndex + 1 == comment.length() ? "NULL" : (String.format("'%s'", comment.substring(endIndex + 1).trim().replaceAll("'","''"))); executor.writeSql(String.format("UPDATE observe_seine.trip t SET comment = %s, homeId = '%s', topiaVersion = topiaVersion + 1, lastUpdateDate = CURRENT_TIMESTAMP WHERE t.topiaId = '%s';", newComment, homeId, tripId)); } View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/commit/78e241d66c5ca4b045ce0778b7... -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/commit/78e241d66c5ca4b045ce0778b7... You're receiving this email because of your account on gitlab.com.