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

Commits:

10 changed files:

Changes:

  • persistence/src/main/java/fr/ird/observe/persistence/migration/DataSourceMigrationForVersion_7_2.java
    1
    +package fr.ird.observe.persistence.migration;
    
    2
    +
    
    3
    +/*-
    
    4
    + * #%L
    
    5
    + * ObServe :: Persistence
    
    6
    + * %%
    
    7
    + * Copyright (C) 2008 - 2019 IRD, Code Lutin, Ultreia.io
    
    8
    + * %%
    
    9
    + * This program is free software: you can redistribute it and/or modify
    
    10
    + * it under the terms of the GNU General Public License as
    
    11
    + * published by the Free Software Foundation, either version 3 of the
    
    12
    + * License, or (at your option) any later version.
    
    13
    + * 
    
    14
    + * This program is distributed in the hope that it will be useful,
    
    15
    + * but WITHOUT ANY WARRANTY; without even the implied warranty of
    
    16
    + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    
    17
    + * GNU General Public License for more details.
    
    18
    + * 
    
    19
    + * You should have received a copy of the GNU General Public
    
    20
    + * License along with this program.  If not, see
    
    21
    + * <http://www.gnu.org/licenses/gpl-3.0.html>.
    
    22
    + * #L%
    
    23
    + */
    
    24
    +
    
    25
    +import com.google.auto.service.AutoService;
    
    26
    +import org.nuiton.topia.service.migration.resources.MigrationVersionResource;
    
    27
    +import org.nuiton.topia.service.migration.resources.MigrationVersionResourceExecutor;
    
    28
    +import org.nuiton.version.Versions;
    
    29
    +
    
    30
    +@AutoService(MigrationVersionResource.class)
    
    31
    +public class DataSourceMigrationForVersion_7_2 extends MigrationVersionResource {
    
    32
    +
    
    33
    +    public DataSourceMigrationForVersion_7_2() {
    
    34
    +        super(Versions.valueOf("7.2"));
    
    35
    +    }
    
    36
    +
    
    37
    +    @Override
    
    38
    +    public void generateSqlScript(MigrationVersionResourceExecutor executor) {
    
    39
    +        executor.addScript("01", "fix_trip_longline_comment");
    
    40
    +    }
    
    41
    +
    
    42
    +}
    
    43
    +

  • persistence/src/main/resources/db/migration/7.2/01_fix_trip_longline_comment-H2.sql
    1
    +---
    
    2
    +-- #%L
    
    3
    +-- ObServe :: Persistence
    
    4
    +-- %%
    
    5
    +-- Copyright (C) 2008 - 2019 IRD, Code Lutin, Ultreia.io
    
    6
    +-- %%
    
    7
    +-- This program is free software: you can redistribute it and/or modify
    
    8
    +-- it under the terms of the GNU General Public License as
    
    9
    +-- published by the Free Software Foundation, either version 3 of the
    
    10
    +-- License, or (at your option) any later version.
    
    11
    +-- 
    
    12
    +-- This program is distributed in the hope that it will be useful,
    
    13
    +-- but WITHOUT ANY WARRANTY; without even the implied warranty of
    
    14
    +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    
    15
    +-- GNU General Public License for more details.
    
    16
    +-- 
    
    17
    +-- You should have received a copy of the GNU General Public
    
    18
    +-- License along with this program.  If not, see
    
    19
    +-- <http://www.gnu.org/licenses/gpl-3.0.html>.
    
    20
    +-- #L%
    
    21
    +---
    
    22
    +ALTER TABLE observe_longline.trip ADD COLUMN comment2 VARCHAR(1025);
    
    23
    +UPDATE observe_longline.trip set comment2 = comment;
    
    24
    +ALTER TABLE observe_longline.trip DROP COLUMN comment;
    
    25
    +ALTER TABLE observe_longline.trip ALTER COLUMN comment2 RENAME TO comment;

  • persistence/src/main/resources/db/migration/7.2/01_fix_trip_longline_comment-PG.sql
    1
    +---
    
    2
    +-- #%L
    
    3
    +-- ObServe :: Persistence
    
    4
    +-- %%
    
    5
    +-- Copyright (C) 2008 - 2019 IRD, Code Lutin, Ultreia.io
    
    6
    +-- %%
    
    7
    +-- This program is free software: you can redistribute it and/or modify
    
    8
    +-- it under the terms of the GNU General Public License as
    
    9
    +-- published by the Free Software Foundation, either version 3 of the
    
    10
    +-- License, or (at your option) any later version.
    
    11
    +-- 
    
    12
    +-- This program is distributed in the hope that it will be useful,
    
    13
    +-- but WITHOUT ANY WARRANTY; without even the implied warranty of
    
    14
    +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    
    15
    +-- GNU General Public License for more details.
    
    16
    +-- 
    
    17
    +-- You should have received a copy of the GNU General Public
    
    18
    +-- License along with this program.  If not, see
    
    19
    +-- <http://www.gnu.org/licenses/gpl-3.0.html>.
    
    20
    +-- #L%
    
    21
    +---
    
    22
    +ALTER TABLE observe_longline.trip ADD COLUMN comment2 VARCHAR(1025);
    
    23
    +UPDATE observe_longline.trip set comment2 = comment;
    
    24
    +ALTER TABLE observe_longline.trip DROP COLUMN comment CASCADE;
    
    25
    +ALTER TABLE observe_longline.trip RENAME comment2 TO comment;

  • pom.xml
    ... ... @@ -149,7 +149,7 @@
    149 149
         <devMode>true</devMode>
    
    150 150
     
    
    151 151
         <!--persistence model version-->
    
    152
    -    <observe.model.version>7.1</observe.model.version>
    
    152
    +    <observe.model.version>7.2</observe.model.version>
    
    153 153
     
    
    154 154
         <!-- build timestamp configuration -->
    
    155 155
         <maven.build.timestamp.format>dd/MM/yyyy HH:mm z</maven.build.timestamp.format>
    

  • test/src/main/resources/db/7.2/dataForTestLongline.sql.gz
    No preview for this file type
  • test/src/main/resources/db/7.2/dataForTestSeine.sql.gz
    No preview for this file type
  • test/src/main/resources/db/7.2/empty_h2.sql.gz
    No preview for this file type
  • test/src/main/resources/db/7.2/empty_pg.sql.gz
    No preview for this file type
  • test/src/main/resources/db/7.2/referentiel.sql.gz
    No preview for this file type
  • validation/src/main/i18n/getters/validation-fields.getter
    ... ... @@ -100,12 +100,10 @@ observe.common.IdDto.quadrant
    100 100
     observe.common.IdDto.sex
    
    101 101
     observe.common.IdDto.sizeMeasureType
    
    102 102
     observe.common.IdDto.species
    
    103
    -observe.common.LengthLengthParameterDto.coefficients
    
    104 103
     observe.common.LengthLengthParameterDto.inputOutputFormula
    
    105 104
     observe.common.LengthLengthParameterDto.inputSizeMeasureType
    
    106 105
     observe.common.LengthLengthParameterDto.outputInputFormula
    
    107 106
     observe.common.LengthLengthParameterDto.outputSizeMeasureType
    
    108
    -observe.common.LengthWeightParameterDto.coefficients
    
    109 107
     observe.common.LengthWeightParameterDto.lengthWeightFormula
    
    110 108
     observe.common.LengthWeightParameterDto.weightLengthFormula
    
    111 109
     observe.common.NonTargetCatchDto.catchWeight