[Git][ultreiaio/ird-observe][develop] Erreur migration base centrale 7.3 -> 7.6 - Closes #1489
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: 58fcf955 by Tony Chemit at 2020-05-23T14:02:19+02:00 Erreur migration base centrale 7.3 -> 7.6 - Closes #1489 - - - - - 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 ===================================== @@ -68,6 +68,10 @@ public class DataSourceMigrationForVersion_7_6 extends MigrationVersionResource String comment = pair.getValue().trim(); int endIndex = comment.indexOf('#', 1); + if (endIndex == 1) { + // Must be a ## starting comment + continue; + } String homeId = comment.substring(1, endIndex - 1); 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/58fcf955b1787af8f30ecbe834... -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/commit/58fcf955b1787af8f30ecbe834... You're receiving this email because of your account on gitlab.com.
participants (1)
-
Tony CHEMIT