Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: 0d38cd09 by Tony CHEMIT at 2018-05-19T10:26:58Z Ajout de nouvelles entrées dans le référentiel observe_common.VesselType - Closes #889 - - - - - 7 changed files: - persistence/src/main/java/fr/ird/observe/persistence/migration/DataSourceMigrationForVersion_8_0.java - + persistence/src/main/resources/db/migration/8.0/03_update_vesseltype-common.sql - services-local/src/test/java/fr/ird/observe/services/local/service/actions/validate/ValidateServiceLocalTest.java - test/src/main/java/fr/ird/observe/test/ObserveFixtures.java - test/src/main/resources/db/8.0/dataForTestLongline.sql.gz - test/src/main/resources/db/8.0/dataForTestSeine.sql.gz - test/src/main/resources/db/8.0/referentiel.sql.gz Changes: ===================================== persistence/src/main/java/fr/ird/observe/persistence/migration/DataSourceMigrationForVersion_8_0.java ===================================== --- a/persistence/src/main/java/fr/ird/observe/persistence/migration/DataSourceMigrationForVersion_8_0.java +++ b/persistence/src/main/java/fr/ird/observe/persistence/migration/DataSourceMigrationForVersion_8_0.java @@ -45,6 +45,7 @@ public class DataSourceMigrationForVersion_8_0 extends MigrationVersionResource executor.removeFK("observe_seine", "Activity", "wind"); executor.addScript("01", "move_wind_referential"); executor.addScript("02", "wind_i18n"); + executor.addScript("03", "update_vesseltype"); } } ===================================== persistence/src/main/resources/db/migration/8.0/03_update_vesseltype-common.sql ===================================== --- /dev/null +++ b/persistence/src/main/resources/db/migration/8.0/03_update_vesseltype-common.sql @@ -0,0 +1,23 @@ +--- +-- #%L +-- ObServe :: Persistence +-- %% +-- Copyright (C) 2008 - 2018 IRD, Code Lutin, Ultreia.io +-- %% +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as +-- published by the Free Software Foundation, either version 3 of the +-- License, or (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public +-- License along with this program. If not, see +-- <http://www.gnu.org/licenses/gpl-3.0.html>. +-- #L% +--- +INSERT INTO observe_common.VesselType(topiaid, topiaversion, topiacreatedate, lastupdatedate, status, needComment, code, label1, label2, label3) values ('fr.ird.observe.entities.referentiel.VesselType#666#1' , 0, CURRENT_DATE, CURRENT_TIMESTAMP, 1, false, null,'Industrial longliner', 'Palangrier industriel','Industrial longliner #TODO'); +INSERT INTO observe_common.VesselType(topiaid, topiaversion, topiacreatedate, lastupdatedate, status, needComment, code, label1, label2, label3) values ('fr.ird.observe.entities.referentiel.VesselType#666#2' , 0, CURRENT_DATE, CURRENT_TIMESTAMP, 1, false, null,'Semi industrial longliner', 'Palangrier semi industriel','Semi industrial longliner #TODO'); \ No newline at end of file ===================================== services-local/src/test/java/fr/ird/observe/services/local/service/actions/validate/ValidateServiceLocalTest.java ===================================== --- a/services-local/src/test/java/fr/ird/observe/services/local/service/actions/validate/ValidateServiceLocalTest.java +++ b/services-local/src/test/java/fr/ird/observe/services/local/service/actions/validate/ValidateServiceLocalTest.java @@ -165,7 +165,7 @@ public class ValidateServiceLocalTest extends ServiceLocalTestSupport { assertValidateResult(result, SpeciesListDto.class, 1); assertValidateResult(result, LightsticksColorDto.class, 2); assertValidateResult(result, BaitSettingStatusDto.class, 1); - assertValidateResult(result, VesselTypeDto.class, 3); + assertValidateResult(result, VesselTypeDto.class, 4); assertValidateResult(result, SexDto.class, 2); assertValidateResult(result, NonTargetCatchReleaseConformityDto.class, 2); ===================================== test/src/main/java/fr/ird/observe/test/ObserveFixtures.java ===================================== --- a/test/src/main/java/fr/ird/observe/test/ObserveFixtures.java +++ b/test/src/main/java/fr/ird/observe/test/ObserveFixtures.java @@ -271,7 +271,7 @@ public class ObserveFixtures { .put("observe_common.specieslist", 6L) .put("observe_common.vessel", 1172L) .put("observe_common.vesselsizecategory", 13L) - .put("observe_common.vesseltype", 14L) + .put("observe_common.vesseltype", 16L) .put("observe_common.weightmeasuretype", 3L) .put("observe_common.wind", 13L) .build(); ===================================== test/src/main/resources/db/8.0/dataForTestLongline.sql.gz ===================================== The diff for this file was not included because it is too large. ===================================== test/src/main/resources/db/8.0/dataForTestSeine.sql.gz ===================================== The diff for this file was not included because it is too large. ===================================== test/src/main/resources/db/8.0/referentiel.sql.gz ===================================== The diff for this file was not included because it is too large. View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/0d38cd0959c0810d3ca0003267a6... -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/0d38cd0959c0810d3ca0003267a6... You're receiving this email because of your account on gitlab.com.