Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe

Commits:

1 changed file:

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
    72 72
                     // Must be a ## starting comment
    
    73 73
                     continue;
    
    74 74
                 }
    
    75
    -            String homeId = comment.substring(1, endIndex - 1);
    
    75
    +            String homeId = comment.substring(1, endIndex);
    
    76 76
                 String newComment = endIndex + 1 == comment.length() ? "NULL" : (String.format("'%s'", comment.substring(endIndex + 1).trim().replaceAll("'","''")));
    
    77 77
                 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));
    
    78 78
             }