Tony CHEMIT pushed to branch develop-7.x at ultreiaio / ird-observe Commits: fbe50611 by Tony Chemit at 2020-05-23T14:00:55+02:00 Erreur migration base centrale 7.3 -> 7.6 - Closes #1489 - - - - - 1 changed file: - persistence/src/main/java/fr/ird/observe/persistence/migration/DataSourceMigrationForVersion_7_6.java Changes: ===================================== persistence/src/main/java/fr/ird/observe/persistence/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/fbe50611cf425d26bd9594ffa5... -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/commit/fbe50611cf425d26bd9594ffa5... You're receiving this email because of your account on gitlab.com.