Observe-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
July 2019
- 1 participants
- 106 discussions
[Git][ultreiaio/ird-observe][develop-9] Insertion du plan de cuves - See #1260
by Tony CHEMIT 18 Jul '19
by Tony CHEMIT 18 Jul '19
18 Jul '19
Tony CHEMIT pushed to branch develop-9 at ultreiaio / ird-observe
Commits:
7d1df40e by tchemit at 2019-07-18T02:30:23Z
Insertion du plan de cuves - See #1260
- - - - -
30 changed files:
- client-core/src/main/i18n/getters/java.getter
- client-core/src/main/i18n/getters/jaxx.getter
- client-core/src/main/java/fr/ird/observe/client/db/ObserveSwingDataSource.java
- client-core/src/main/java/fr/ird/observe/client/ui/content/api/ContentUIHandler.java
- + client-core/src/main/java/fr/ird/observe/client/ui/content/data/ps/wellplan/TripSeineWellPlanUI.jaxx
- + client-core/src/main/java/fr/ird/observe/client/ui/content/data/ps/wellplan/TripSeineWellPlanUI.jcss
- + client-core/src/main/java/fr/ird/observe/client/ui/content/data/ps/wellplan/TripSeineWellPlanUIHandler.java
- + client-core/src/main/java/fr/ird/observe/client/ui/content/data/ps/wellplan/TripSeineWellPlanUIModel.java
- client-core/src/main/java/fr/ird/observe/client/ui/tree/navigation/nodes/data/ps/common/TripSeineNavigationTreeNode.java
- + client-core/src/main/java/fr/ird/observe/client/ui/tree/navigation/nodes/data/ps/wellplan/TripSeineWellPlanNavigationNode.java
- client-core/src/main/resources/observe-ui.properties
- dto/src/main/i18n/getters/eugene.getter
- dto/src/main/java/fr/ird/observe/dto/decoration/DecoratorService.java
- dto/src/main/java/fr/ird/observe/spi/DtoModelClasses.java
- + dto/src/main/models/Observe-06-referential-ps-wellplan.model
- + dto/src/main/models/Observe-23-data-ps-wellplan.model
- observe-i18n/src/main/i18n/translations/observe_en_GB.properties
- observe-i18n/src/main/i18n/translations/observe_es_ES.properties
- observe-i18n/src/main/i18n/translations/observe_fr_FR.properties
- persistence/pom.xml
- + persistence/src/main/java/fr/ird/observe/binder/data/ps/wellplan/TripSeineWellPlanEntityDtoBinder.java
- + persistence/src/main/java/fr/ird/observe/binder/data/ps/wellplan/WellPlanEntityDtoBinder.java
- persistence/src/main/java/fr/ird/observe/entities/Entities.java
- persistence/src/main/java/fr/ird/observe/entities/migration/DataSourceMigrationForVersion_9_1.java
- + persistence/src/main/models/Observe-06-referential-ps-wellplan.model
- + persistence/src/main/models/Observe-23-data-ps-wellplan.model
- persistence/src/main/models/Observe-25-data-ps-common.model
- + persistence/src/main/resources/db/migration/9.1/05_ps_wellplan_add_referential_tables-common.sql
- + persistence/src/main/resources/db/migration/9.1/06_ps_wellplan_add_data_tables-common.sql
- server-core/src/main/filtered-resources/mapping
The diff was not included because it is too large.
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/7d1df40eb153287a3524f6a7ce2…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/7d1df40eb153287a3524f6a7ce2…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop-9] Insertion des lots de débarquements - See #1259
by Tony CHEMIT 18 Jul '19
by Tony CHEMIT 18 Jul '19
18 Jul '19
Tony CHEMIT pushed to branch develop-9 at ultreiaio / ird-observe
Commits:
fe1bd851 by tchemit at 2019-07-18T01:18:37Z
Insertion des lots de débarquements - See #1259
- - - - -
30 changed files:
- client-core/src/main/i18n/getters/java.getter
- client-core/src/main/i18n/getters/jaxx.getter
- client-core/src/main/java/fr/ird/observe/client/db/ObserveSwingDataSource.java
- client-core/src/main/java/fr/ird/observe/client/ui/ObserveMainUI.jaxx
- client-core/src/main/java/fr/ird/observe/client/ui/ObserveMainUI.jcss
- client-core/src/main/java/fr/ird/observe/client/ui/ObserveMainUIInitializer.java
- + client-core/src/main/java/fr/ird/observe/client/ui/actions/main/menu/navigation/SelectSeineLandingReferentialAction.java
- client-core/src/main/java/fr/ird/observe/client/ui/content/api/ContentUIHandler.java
- + client-core/src/main/java/fr/ird/observe/client/ui/content/data/ps/landing/TripSeineLandingUI.jaxx
- + client-core/src/main/java/fr/ird/observe/client/ui/content/data/ps/landing/TripSeineLandingUIHandler.java
- + client-core/src/main/java/fr/ird/observe/client/ui/content/data/ps/landing/TripSeineLandingUIModel.java
- + client-core/src/main/java/fr/ird/observe/client/ui/content/ref/ps/landing/FateUI.jaxx
- + client-core/src/main/java/fr/ird/observe/client/ui/content/ref/ps/landing/FateUIHandler.java
- + client-core/src/main/java/fr/ird/observe/client/ui/content/ref/ps/landing/FateUIModel.java
- + client-core/src/main/java/fr/ird/observe/client/ui/content/ref/ps/landing/ReferenceHomeSeineLandingUI.java
- + client-core/src/main/java/fr/ird/observe/client/ui/content/ref/ps/landing/ReferenceHomeSeineLandingUIModel.java
- + client-core/src/main/java/fr/ird/observe/client/ui/content/ref/ps/landing/WeightCategoryUI.jaxx
- + client-core/src/main/java/fr/ird/observe/client/ui/content/ref/ps/landing/WeightCategoryUIHandler.java
- + client-core/src/main/java/fr/ird/observe/client/ui/content/ref/ps/landing/WeightCategoryUIModel.java
- client-core/src/main/java/fr/ird/observe/client/ui/tree/navigation/NavigationTreeModel.java
- client-core/src/main/java/fr/ird/observe/client/ui/tree/navigation/nodes/data/ps/common/TripSeineNavigationTreeNode.java
- + client-core/src/main/java/fr/ird/observe/client/ui/tree/navigation/nodes/data/ps/landing/TripSeineLandingNavigationNode.java
- + client-core/src/main/java/fr/ird/observe/client/ui/tree/navigation/nodes/ref/ps/ReferentialListSeineLandingNavigationTreeNode.java
- client-core/src/main/resources/observe-ui.properties
- dto/src/main/i18n/getters/eugene.getter
- dto/src/main/java/fr/ird/observe/dto/decoration/DecoratorService.java
- dto/src/main/java/fr/ird/observe/spi/DtoModelClasses.java
- + dto/src/main/models/Observe-05-referential-ps-landing.model
- + dto/src/main/models/Observe-22-data-ps-landing.model
- observe-i18n/src/main/i18n/translations/observe_en_GB.properties
The diff was not included because it is too large.
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/fe1bd85166ae982c59c4093c661…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/fe1bd85166ae982c59c4093c661…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop-9] 17 commits: Revert "[PS][CALCUL] Problèmes de calcul avec quelques marées...
by Tony CHEMIT 16 Jul '19
by Tony CHEMIT 16 Jul '19
16 Jul '19
Tony CHEMIT pushed to branch develop-9 at ultreiaio / ird-observe
Commits:
5d4a5e91 by tchemit at 2019-07-16T13:20:55Z
Revert "[PS][CALCUL] Problèmes de calcul avec quelques marées (findLengthLengthParameter) - Closes #1350"
This reverts commit 7f2e5857fb9b409b169c1f782ac90238adcfb87a.
- - - - -
b4f6d4f9 by tchemit at 2019-07-16T17:13:11Z
Renommer champs vessel.iattcid et vessel.ctoiid - Closes #1349
- - - - -
1d53b191 by tchemit at 2019-07-16T17:13:12Z
[REF] Consolidation du réferentiel common.LengthWeightParameter - Closes #1350
[REF] Consolidation du réferentiel common.LengthLengthParameter - Closes #1351
- - - - -
11392cc4 by tchemit at 2019-07-16T18:26:15Z
Problème synchro avancée référentiel - Closes #1352
- - - - -
9490d17a by tchemit at 2019-07-16T20:59:45Z
Consolidation des champs techniques en base - Closes #1353
- - - - -
3cc91b41 by tchemit at 2019-07-16T21:06:07Z
update changelog [skip ci]
- - - - -
6a4ac7bc by tchemit at 2019-07-16T21:07:52Z
[CARTE] Symboles de cartes pour V8 et V9 - Refactor code - See #1343
- - - - -
cf89e299 by tchemit at 2019-07-16T21:07:53Z
Réorganisation des données d’observation PS - Réorganisation des captures et échantillons de cible et bycatch observés - See #1254
- - - - -
f7c1e0fa by tchemit at 2019-07-16T21:07:53Z
Move to new version 9.0-alpha-1
- - - - -
41fc87cd by tchemit at 2019-07-16T21:07:53Z
Réorganisation des données d’observation PS - Re localisation dans la hiérarchie - Closes #1252
- - - - -
c8c36539 by tchemit at 2019-07-16T21:07:54Z
Module 2 (first flush)
- - - - -
73f09846 by tchemit at 2019-07-16T21:07:54Z
[PS] Contenu des onglets spécifiques observations et logbooks et le formulaire marée - See #1300
- - - - -
5c3d7067 by tchemit at 2019-07-16T21:08:17Z
Module 2 - second flush
- - - - -
b6c8388f by tchemit at 2019-07-16T21:08:17Z
Report from v8 for ps logbook model
- - - - -
5bc768e4 by tchemit at 2019-07-16T21:08:17Z
Choix de nouvelles couleurs pour les symboles de la carte LL - Closes #1293
- - - - -
ce5b4b04 by tchemit at 2019-07-16T21:08:17Z
[CARTE] Symboles de cartes pour V8 et V9 - Realign for Ps model - See #1343
- - - - -
975b1a27 by tchemit at 2019-07-16T21:20:41Z
Consolidation des champs techniques en base - Realing on v9 - See #1353
- - - - -
30 changed files:
- + .mvn/gitlab-cache/milestones/921497-artifacts.json
- .mvn/gitlab-cache/milestones/921497-issues.json
- + .mvn/gitlab-cache/milestones/925832-artifacts.json
- .mvn/gitlab-cache/milestones/925832-issues.json
- .mvn/gitlab-cache/milestones/925832.json
- .mvn/pom.gitflow.develop
- .mvn/pom.gitflow.master
- CHANGELOG.md
- client-configuration/.mvn/pom.gitflow.develop
- client-configuration/.mvn/pom.gitflow.master
- client-configuration/pom.xml
- client-configuration/src/main/config/Client.ini
- client-configuration/src/main/i18n/getters/config.getter
- client-configuration/src/main/i18n/getters/java-enumeration.getter
- client-configuration/src/main/i18n/getters/java.getter
- client-core/.mvn/pom.gitflow.develop
- client-core/.mvn/pom.gitflow.master
- client-core/pom.xml
- client-core/src/license/THIRD-PARTY.properties
- client-core/src/main/dcp-presets/ps/logbook/01-deployment-preset.yml
- client-core/src/main/dcp-presets/ps/logbook/02-removal-preset.yml
- client-core/src/main/dcp-presets/ps/logbook/03-update-preset.yml
- client-core/src/main/dcp-presets/ps/logbook/04-abandonned-preset.yml
- client-core/src/main/i18n/getters/java.getter
- client-core/src/main/i18n/getters/jaxx.getter
- client-core/src/main/java/fr/ird/observe/client/db/ObserveSwingDataSource.java
- client-core/src/main/java/fr/ird/observe/client/navigation/RouteCloseCallback.java
- client-core/src/main/java/fr/ird/observe/client/ui/ObserveMainUI.jaxx
- client-core/src/main/java/fr/ird/observe/client/ui/ObserveMainUI.jcss
- + client-core/src/main/java/fr/ird/observe/client/ui/actions/content/data/ps/ChooseRelatedObservedActivityUIAction.java
The diff was not included because it is too large.
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/87d0b899d416eb05cd2dd3203f…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/87d0b899d416eb05cd2dd3203f…
You're receiving this email because of your account on gitlab.com.
1
0
16 Jul '19
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
3cc91b41 by tchemit at 2019-07-16T21:06:07Z
update changelog [skip ci]
- - - - -
6 changed files:
- + .mvn/gitlab-cache/milestones/921497-artifacts.json
- .mvn/gitlab-cache/milestones/921497-issues.json
- + .mvn/gitlab-cache/milestones/925832-artifacts.json
- .mvn/gitlab-cache/milestones/925832-issues.json
- .mvn/gitlab-cache/milestones/925832.json
- CHANGELOG.md
Changes:
=====================================
.mvn/gitlab-cache/milestones/921497-artifacts.json
=====================================
@@ -0,0 +1,12 @@
+[
+ {
+ "name": "Application",
+ "filename": "observe-8.0-RC-4.zip",
+ "url": "http://repo1.maven.org/maven2/fr/ird/observe/observe/8.0-RC-4/observe-8.0-R…"
+ },
+ {
+ "name": "Serveur",
+ "filename": "observe-8.0-RC-4.war",
+ "url": "http://repo1.maven.org/maven2/fr/ird/observe/observe/8.0-RC-4/observe-8.0-R…"
+ }
+]
\ No newline at end of file
=====================================
.mvn/gitlab-cache/milestones/921497-issues.json
=====================================
@@ -1,4 +1,66 @@
[
+ {
+ "id": 22667447,
+ "iid": 1349,
+ "projectId": 2722779,
+ "title": "Renommer champs vessel.iattcid et vessel.ctoiid",
+ "description": "vessel.iattcid devrait s\u0027appeler vessel.iccat\nvessel.ctoiid devrait s\u0027appeler vessel.iotcid\n\nC\u0027est une vieille erreur de nommage",
+ "labels": [
+ "Bas",
+ "Evolution",
+ "Module 1",
+ "À facturer"
+ ],
+ "milestone": {
+ "id": 921497,
+ "iid": 146,
+ "projectId": 2722779,
+ "groupId": 0,
+ "title": "8.0-RC-4",
+ "description": "",
+ "startDate": "Jul 3, 2019 2:00:00 AM",
+ "state": "active"
+ },
+ "assignees": [
+ {
+ "_id": 166231,
+ "_username": "tchemit",
+ "_name": "Tony CHEMIT",
+ "_state": "active",
+ "_external": false,
+ "_avatarUrl": "https://secure.gravatar.com/avatar/2a915aa9a1df35c8b609ff2f750d5dac?s\u003d…"
+ }
+ ],
+ "assignee": {
+ "_id": 166231,
+ "_username": "tchemit",
+ "_name": "Tony CHEMIT",
+ "_state": "active",
+ "_external": false,
+ "_avatarUrl": "https://secure.gravatar.com/avatar/2a915aa9a1df35c8b609ff2f750d5dac?s\u003d…"
+ },
+ "author": {
+ "_id": 1111318,
+ "_username": "pcauquil",
+ "_name": "Pascal Cauquil",
+ "_state": "active",
+ "_external": false,
+ "_avatarUrl": "https://secure.gravatar.com/avatar/b4ae117bd93e10d96298fa4d885208ea?s\u003d…"
+ },
+ "userNotesCount": 1,
+ "upVotes": 0,
+ "downVotes": 0,
+ "confidential": false,
+ "timeStats": {
+ "timeEstimate": 0,
+ "totalTimeSpent": 0
+ },
+ "state": "closed",
+ "updatedAt": "Jul 16, 2019 6:42:45 PM",
+ "createdAt": "Jul 10, 2019 3:20:00 PM",
+ "closedAt": "Jul 16, 2019 6:42:45 PM",
+ "webUrl": "https://gitlab.com/ultreiaio/ird-observe/issues/1349"
+ },
{
"id": 18519309,
"iid": 1237,
@@ -121,7 +183,7 @@
"id": 21224725,
"iid": 1299,
"projectId": 2722779,
- "title": "[V8][V9] Piur l\u0027algorithme d\u0027appariement d\u0027activités LL/PS, décider du comprtement vis-à-vis de l\u0027absence d\u0027heures sur les activités (cas très fréquent sur les logbooks)",
+ "title": "[V8][V9] Pour l\u0027algorithme d\u0027appariement d\u0027activités (LL comme PS), décider du comportement vis-à-vis de l\u0027absence d\u0027heures sur les activités (cas très fréquent sur les logbooks)",
"description": "[V8][V9] Pour l\u0027algorithme d\u0027appariement d\u0027activités LL/PS, décider du comportement vis-à-vis de l\u0027absence d\u0027heures sur les activités (cas très fréquent sur les logbooks)",
"labels": [
"Evolution",
@@ -163,7 +225,7 @@
"_external": false,
"_avatarUrl": "https://secure.gravatar.com/avatar/b4ae117bd93e10d96298fa4d885208ea?s\u003d…"
},
- "userNotesCount": 0,
+ "userNotesCount": 1,
"upVotes": 0,
"downVotes": 0,
"confidential": false,
@@ -172,7 +234,7 @@
"totalTimeSpent": 0
},
"state": "opened",
- "updatedAt": "Jul 2, 2019 9:42:21 AM",
+ "updatedAt": "Jul 3, 2019 6:19:39 PM",
"createdAt": "May 23, 2019 4:23:51 PM",
"webUrl": "https://gitlab.com/ultreiaio/ird-observe/issues/1299"
}
=====================================
.mvn/gitlab-cache/milestones/925832-artifacts.json
=====================================
@@ -0,0 +1,12 @@
+[
+ {
+ "name": "Application",
+ "filename": "observe-7.1.0.zip",
+ "url": "http://repo1.maven.org/maven2/fr/ird/observe/observe/7.1.0/observe-7.1.0.zip"
+ },
+ {
+ "name": "Serveur",
+ "filename": "observe-7.1.0.war",
+ "url": "http://repo1.maven.org/maven2/fr/ird/observe/observe/7.1.0/observe-7.1.0.war"
+ }
+]
\ No newline at end of file
=====================================
.mvn/gitlab-cache/milestones/925832-issues.json
=====================================
@@ -1 +1,236 @@
-[]
\ No newline at end of file
+[
+ {
+ "id": 22808181,
+ "iid": 1350,
+ "projectId": 2722779,
+ "title": "[REF] Consolidation du réferentiel common.LengthWeightParameter",
+ "description": "Certaines marées font échouer la procédure de calcul (y compris en base locale).\n\nCela semble être lié avec l\u0027absence de relations de conversion taille-taille (dont le logiciel devrait pouvoir s\u0027accommoder) :\n\n```\nERROR 2019-07-15T16:56:10,620 [ActionWorker-pool-3-thread-5] ConsolidateDataServiceLocal : 256 - Route [25/30] - Activity [5/11] Could not consolidate trip: fr.ird.observe.entities.seine.TripSeine#1551788010186#0.29570524927698383, route: fr.ird.observe.entities.seine.Route#1553843145076#0.21979391074451293 - activity: fr.ird.observe.entities.seine.ActivitySeine#1553852782133#0.8671247297616144\njava.lang.NullPointerException: null\n\tat java.util.Objects.requireNonNull(Unknown Source) ~[?:1.8.0_201]\n\tat fr.ird.observe.entities.referentiel.LengthLengthParameterTopiaDao.findAll(LengthLengthParameterTopiaDao.java:41) ~[observe.jar:7.0.8]\n\tat fr.ird.observe.entities.referentiel.LengthLengthParameters.findLengthLengthParameter(LengthLengthParameters.java:78) ~[observe.jar:7.0.8]\n\tat fr.ird.observe.services.local.service.actions.consolidate.ConsolidationActivitySeineDataContext.findLengthLengthParameter(ConsolidationActivitySeineDataContext.java:116) ~[observe.jar:7.0.8]\n\tat fr.ird.observe.services.local.service.actions.consolidate.ConsolidateDataServiceLocal.updateLengthWeightAble(ConsolidateDataServiceLocal.java:698) ~[observe.jar:7.0.8]\n\tat fr.ird.observe.services.local.service.actions.consolidate.ConsolidateDataServiceLocal.consolidateActivitySeine(ConsolidateDataServiceLocal.java:349) ~[observe.jar:7.0.8]\n\tat fr.ird.observe.services.local.service.actions.consolidate.ConsolidateDataServiceLocal.consolidateTripSeine(ConsolidateDataServiceLocal.java:254) ~[observe.jar:7.0.8]\n\tat fr.ird.observe.services.local.service.actions.consolidate.ConsolidateDataServiceLocal.consolidateTripSeine(ConsolidateDataServiceLocal.java:154) ~[observe.jar:7.0.8]\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_201]\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_201]\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_201]\n```\n\nBase témoin : [3-marees-a-problemes.sql.gz](/uploads/60dd5003cbfe9f91bc739dd6d9cf8c39/3-marees-a-problemes.sql.gz)\n\nLog : [observe-7.0.8-SNAPSHOT.log](/uploads/8d5057b55d6cc1977f1a821eba175be3/observe-7.0.8-SNAPSHOT.log)",
+ "labels": [
+ "Anomalie",
+ "Contrat Code Lutin-2016",
+ "Haut",
+ "Senne",
+ "Urgent"
+ ],
+ "milestone": {
+ "id": 925832,
+ "iid": 147,
+ "projectId": 2722779,
+ "groupId": 0,
+ "title": "7.1.0",
+ "description": "",
+ "dueDate": "Jul 16, 2019 2:00:00 AM",
+ "startDate": "Jul 6, 2019 2:00:00 AM",
+ "state": "closed"
+ },
+ "assignees": [
+ {
+ "_id": 1111318,
+ "_username": "pcauquil",
+ "_name": "Pascal Cauquil",
+ "_state": "active",
+ "_external": false,
+ "_avatarUrl": "https://secure.gravatar.com/avatar/b4ae117bd93e10d96298fa4d885208ea?s\u003d…"
+ }
+ ],
+ "assignee": {
+ "_id": 1111318,
+ "_username": "pcauquil",
+ "_name": "Pascal Cauquil",
+ "_state": "active",
+ "_external": false,
+ "_avatarUrl": "https://secure.gravatar.com/avatar/b4ae117bd93e10d96298fa4d885208ea?s\u003d…"
+ },
+ "author": {
+ "_id": 1111318,
+ "_username": "pcauquil",
+ "_name": "Pascal Cauquil",
+ "_state": "active",
+ "_external": false,
+ "_avatarUrl": "https://secure.gravatar.com/avatar/b4ae117bd93e10d96298fa4d885208ea?s\u003d…"
+ },
+ "userNotesCount": 11,
+ "upVotes": 0,
+ "downVotes": 0,
+ "confidential": true,
+ "discussionLocked": true,
+ "timeStats": {
+ "timeEstimate": 0,
+ "totalTimeSpent": 0
+ },
+ "state": "closed",
+ "updatedAt": "Jul 16, 2019 4:59:11 PM",
+ "createdAt": "Jul 15, 2019 4:59:40 PM",
+ "closedAt": "Jul 16, 2019 1:04:47 PM",
+ "webUrl": "https://gitlab.com/ultreiaio/ird-observe/issues/1350"
+ },
+ {
+ "id": 22842012,
+ "iid": 1352,
+ "projectId": 2722779,
+ "title": "Problème synchro avancée référentiel",
+ "description": "Dans une base centrale une espèce a été rajoutée, ainsi que deux relations taille-poids qui la concenrnent (pour Atlantique et Indien).\n\nOn essaie de transférer ces ajouts dans une autre base centrale :\n\n\n\nL\u0027application échoue :\n\n\n\nLog serveur : [localhost.2019-07-16.log](/uploads/be18913a88e7886ca6513c0075fdbadd/localhost.2019-07-16.log)\n\nSi on fait cette opération en deux étapes :\n* d\u0027abord l\u0027espèce\n* puis ses 2 relations TP\n\nCela fonctionne. Donc l\u0027algorithme ne traite pas les 2 entités dans un ordre respectant l\u0027interdépendance.",
+ "labels": [
+ "Anomalie",
+ "Haut",
+ "À corriger"
+ ],
+ "milestone": {
+ "id": 925832,
+ "iid": 147,
+ "projectId": 2722779,
+ "groupId": 0,
+ "title": "7.1.0",
+ "description": "",
+ "dueDate": "Jul 16, 2019 2:00:00 AM",
+ "startDate": "Jul 6, 2019 2:00:00 AM",
+ "state": "closed"
+ },
+ "assignees": [
+ {
+ "_id": 166231,
+ "_username": "tchemit",
+ "_name": "Tony CHEMIT",
+ "_state": "active",
+ "_external": false,
+ "_avatarUrl": "https://secure.gravatar.com/avatar/2a915aa9a1df35c8b609ff2f750d5dac?s\u003d…"
+ }
+ ],
+ "assignee": {
+ "_id": 166231,
+ "_username": "tchemit",
+ "_name": "Tony CHEMIT",
+ "_state": "active",
+ "_external": false,
+ "_avatarUrl": "https://secure.gravatar.com/avatar/2a915aa9a1df35c8b609ff2f750d5dac?s\u003d…"
+ },
+ "author": {
+ "_id": 1111318,
+ "_username": "pcauquil",
+ "_name": "Pascal Cauquil",
+ "_state": "active",
+ "_external": false,
+ "_avatarUrl": "https://secure.gravatar.com/avatar/b4ae117bd93e10d96298fa4d885208ea?s\u003d…"
+ },
+ "userNotesCount": 1,
+ "upVotes": 0,
+ "downVotes": 0,
+ "confidential": false,
+ "timeStats": {
+ "timeEstimate": 0,
+ "totalTimeSpent": 0
+ },
+ "state": "closed",
+ "updatedAt": "Jul 16, 2019 8:27:06 PM",
+ "createdAt": "Jul 16, 2019 4:25:01 PM",
+ "closedAt": "Jul 16, 2019 8:27:06 PM",
+ "webUrl": "https://gitlab.com/ultreiaio/ird-observe/issues/1352"
+ },
+ {
+ "id": 22842169,
+ "iid": 1353,
+ "projectId": 2722779,
+ "title": "Consolidation des champs techniques en base",
+ "description": "Il s\u0027assure que tous les champs techniques est bien les contraintes de non nullité, à savoir :\n\n* **topiaCreatedate**\n* **topiaId**\n* **topiaVersion**\n* **lastUpdateDate**",
+ "labels": [
+ "Contrat AZTI-2017",
+ "Evolution",
+ "À facturer"
+ ],
+ "milestone": {
+ "id": 925832,
+ "iid": 147,
+ "projectId": 2722779,
+ "groupId": 0,
+ "title": "7.1.0",
+ "description": "",
+ "dueDate": "Jul 16, 2019 2:00:00 AM",
+ "startDate": "Jul 6, 2019 2:00:00 AM",
+ "state": "closed"
+ },
+ "assignees": [],
+ "author": {
+ "_id": 166231,
+ "_username": "tchemit",
+ "_name": "Tony CHEMIT",
+ "_state": "active",
+ "_external": false,
+ "_avatarUrl": "https://secure.gravatar.com/avatar/2a915aa9a1df35c8b609ff2f750d5dac?s\u003d…"
+ },
+ "userNotesCount": 0,
+ "upVotes": 0,
+ "downVotes": 0,
+ "confidential": false,
+ "timeStats": {
+ "timeEstimate": 0,
+ "totalTimeSpent": 0
+ },
+ "state": "closed",
+ "updatedAt": "Jul 16, 2019 11:00:15 PM",
+ "createdAt": "Jul 16, 2019 4:29:06 PM",
+ "closedAt": "Jul 16, 2019 11:00:15 PM",
+ "webUrl": "https://gitlab.com/ultreiaio/ird-observe/issues/1353"
+ },
+ {
+ "id": 22840693,
+ "iid": 1351,
+ "projectId": 2722779,
+ "title": "[REF] Consolidation du réferentiel common.LengthLengthParameter",
+ "description": "Ajouter des contraintes de non nullité sur les champs suivants :\n\n* **LengthLengthParameter.inputOutputFormula** \n* **LengthLengthParameter.inputSizeMeasureType** \n* **LengthLengthParameter.outputInputFormula** \n* **LengthLengthParameter.outputSizeMeasureType** \n* **LengthLengthParameter.coefficients**\n* **LengthLengthParameter.species**\n* **LengthLengthParameter.ocean**\n* **LengthLengthParameter.sex**\n",
+ "labels": [
+ "Contrat AZTI-2017",
+ "Evolution",
+ "À facturer"
+ ],
+ "milestone": {
+ "id": 925832,
+ "iid": 147,
+ "projectId": 2722779,
+ "groupId": 0,
+ "title": "7.1.0",
+ "description": "",
+ "dueDate": "Jul 16, 2019 2:00:00 AM",
+ "startDate": "Jul 6, 2019 2:00:00 AM",
+ "state": "closed"
+ },
+ "assignees": [
+ {
+ "_id": 166231,
+ "_username": "tchemit",
+ "_name": "Tony CHEMIT",
+ "_state": "active",
+ "_external": false,
+ "_avatarUrl": "https://secure.gravatar.com/avatar/2a915aa9a1df35c8b609ff2f750d5dac?s\u003d…"
+ }
+ ],
+ "assignee": {
+ "_id": 166231,
+ "_username": "tchemit",
+ "_name": "Tony CHEMIT",
+ "_state": "active",
+ "_external": false,
+ "_avatarUrl": "https://secure.gravatar.com/avatar/2a915aa9a1df35c8b609ff2f750d5dac?s\u003d…"
+ },
+ "author": {
+ "_id": 166231,
+ "_username": "tchemit",
+ "_name": "Tony CHEMIT",
+ "_state": "active",
+ "_external": false,
+ "_avatarUrl": "https://secure.gravatar.com/avatar/2a915aa9a1df35c8b609ff2f750d5dac?s\u003d…"
+ },
+ "userNotesCount": 0,
+ "upVotes": 0,
+ "downVotes": 0,
+ "confidential": false,
+ "timeStats": {
+ "timeEstimate": 0,
+ "totalTimeSpent": 0
+ },
+ "state": "closed",
+ "updatedAt": "Jul 16, 2019 7:14:04 PM",
+ "createdAt": "Jul 16, 2019 3:50:41 PM",
+ "closedAt": "Jul 16, 2019 7:14:04 PM",
+ "webUrl": "https://gitlab.com/ultreiaio/ird-observe/issues/1351"
+ }
+]
\ No newline at end of file
=====================================
.mvn/gitlab-cache/milestones/925832.json
=====================================
@@ -3,7 +3,9 @@
"iid": 147,
"projectId": 2722779,
"groupId": 0,
- "title": "7.0.9",
+ "title": "7.1.0",
+ "description": "",
+ "dueDate": "Jul 16, 2019 2:00:00 AM",
"startDate": "Jul 6, 2019 2:00:00 AM",
- "state": "active"
+ "state": "closed"
}
\ No newline at end of file
=====================================
CHANGELOG.md
=====================================
@@ -1,7 +1,7 @@
# ObServe changelog
* Author [Tony Chemit](mailto:dev@tchemit.fr)
- * Last generated at 2019-07-14 15:45.
+ * Last generated at 2019-07-16 23:05.
## Version [8.0-RC-3](https://gitlab.com/ultreiaio/ird-observe/milestones/143)
@@ -199,6 +199,20 @@ Premier lot du contrat IRD-2018-01-V8
* [[Evolution 922]](https://gitlab.com/ultreiaio/ird-observe/issues/922) **Ajoute le référentiel observe_common.DataQuality sur les données existantes** (Thanks to Tony CHEMIT) (Reported by Tony CHEMIT)
* [[Evolution 950]](https://gitlab.com/ultreiaio/ird-observe/issues/950) **Renommage de la classe seine.WeightCategory en seine.WeightCategorySeine** (Thanks to Tony CHEMIT) (Reported by Tony CHEMIT)
+## Version [7.1.0](https://gitlab.com/ultreiaio/ird-observe/milestones/147)
+
+**Closed at 2019-07-16.**
+
+### Download
+* [Application (observe-7.1.0.zip)](http://repo1.maven.org/maven2/fr/ird/observe/observe/7.…)
+* [Serveur (observe-7.1.0.war)](http://repo1.maven.org/maven2/fr/ird/observe/observe/7.…)
+
+### Issues
+ * [[Anomalie 1350]](https://gitlab.com/ultreiaio/ird-observe/issues/1350) **[REF] Consolidation du réferentiel common.LengthWeightParameter** (Thanks to Pascal Cauquil) (Reported by Pascal Cauquil)
+ * [[Anomalie 1352]](https://gitlab.com/ultreiaio/ird-observe/issues/1352) **Problème synchro avancée référentiel** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil)
+ * [[Evolution 1351]](https://gitlab.com/ultreiaio/ird-observe/issues/1351) **[REF] Consolidation du réferentiel common.LengthLengthParameter** (Thanks to Tony CHEMIT) (Reported by Tony CHEMIT)
+ * [[Evolution 1353]](https://gitlab.com/ultreiaio/ird-observe/issues/1353) **Consolidation des champs techniques en base** (Thanks to ) (Reported by Tony CHEMIT)
+
## Version [7.0.8](https://gitlab.com/ultreiaio/ird-observe/milestones/145)
**Closed at 2019-07-04.**
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/3cc91b416e10f3c890e3732ca0b…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/3cc91b416e10f3c890e3732ca0b…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop] Consolidation des champs techniques en base - Closes #1353
by Tony CHEMIT 16 Jul '19
by Tony CHEMIT 16 Jul '19
16 Jul '19
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
9490d17a by tchemit at 2019-07-16T20:59:45Z
Consolidation des champs techniques en base - Closes #1353
- - - - -
17 changed files:
- persistence/src/main/resources/db/migration/8.0/01_move_wind_referential-H2.sql
- persistence/src/main/resources/db/migration/8.0/101_create_common_schema-common.sql
- persistence/src/main/resources/db/migration/8.0/102_create_ps_common_schema-common.sql
- persistence/src/main/resources/db/migration/8.0/103_create_ps_observation_schema-common.sql
- persistence/src/main/resources/db/migration/8.0/104_create_ll_common_schema-common.sql
- persistence/src/main/resources/db/migration/8.0/105_create_ll_observation_schema-common.sql
- persistence/src/main/resources/db/migration/8.0/106_create_ll_logbook_schema-common.sql
- persistence/src/main/resources/db/migration/8.0/107_create_ll_landing_schema-common.sql
- persistence/src/main/resources/db/migration/8.0/201_ps_common_add_referential_tables-common.sql
- persistence/src/main/resources/db/migration/8.0/203_ps_observation_move_common_referential_tables-H2.sql
- persistence/src/main/resources/db/migration/8.0/203_ps_observation_move_common_referential_tables-PG.sql
- pom.xml
- 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/empty_h2.sql.gz
- test/src/main/resources/db/8.0/empty_pg.sql.gz
- test/src/main/resources/db/8.0/referentiel.sql.gz
Changes:
=====================================
persistence/src/main/resources/db/migration/8.0/01_move_wind_referential-H2.sql
=====================================
@@ -26,6 +26,7 @@ CREATE TABLE OBSERVE_COMMON.Wind AS SELECT * FROM OBSERVE_SEINE.Wind;
DROP TABLE OBSERVE_SEINE.Wind;
ALTER TABLE OBSERVE_COMMON.Wind ALTER COLUMN TOPIAID SET NOT NULL;
ALTER TABLE OBSERVE_COMMON.Wind ALTER COLUMN TOPIAVERSION SET NOT NULL;
+ALTER TABLE OBSERVE_COMMON.Wind ALTER COLUMN TOPIACREATEDATE SET NOT NULL;
ALTER TABLE OBSERVE_COMMON.Wind ALTER COLUMN LASTUPDATEDATE SET NOT NULL;
ALTER TABLE OBSERVE_COMMON.Wind ALTER COLUMN NEEDCOMMENT SET NOT NULL;
ALTER TABLE OBSERVE_COMMON.Wind ADD CONSTRAINT PK_WIND PRIMARY KEY(topiaid);
=====================================
persistence/src/main/resources/db/migration/8.0/101_create_common_schema-common.sql
=====================================
@@ -22,34 +22,34 @@
CREATE SCHEMA common;
-CREATE TABLE common.country(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_country PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE NOT NULL, code VARCHAR(255), uri VARCHAR(255), iso2code VARCHAR(255), iso3code VARCHAR(255), status INTEGER DEFAULT 1, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
-CREATE TABLE common.dataquality(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_dataquality PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE NOT NULL, lastupdatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, needcomment BOOLEAN DEFAULT FALSE, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255));
-CREATE TABLE common.fpazone(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_fpazone PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), startdate DATE, enddate DATE, needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
-CREATE TABLE common.gear(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_gear PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), needcomment BOOLEAN, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
-CREATE TABLE common.gearcaracteristictype(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_gearcaracteristictype PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), needcomment BOOLEAN, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
-CREATE TABLE common.gearcaracteristic(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_gearcaracteristic PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), needcomment BOOLEAN, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), unit VARCHAR(255), gearcaracteristictype VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
-CREATE TABLE common.harbour(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_harbour PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), needcomment BOOLEAN, locode VARCHAR(255), latitude NUMERIC, longitude NUMERIC, country VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, label1 VARCHAR(256), label2 VARCHAR(256), label3 VARCHAR(256), label4 VARCHAR(256), label5 VARCHAR(256), label6 VARCHAR(256), label7 VARCHAR(256), label8 VARCHAR(256));
-CREATE TABLE common.lastupdatedate(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_lastupdatedate PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE NOT NULL, type VARCHAR(255) NOT NULL CONSTRAINT uk_lastupdatedate_type unique, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
-CREATE TABLE common.lengthmeasuremethod(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_lengthmeasuremethod PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE NOT NULL, lastupdatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, needcomment BOOLEAN DEFAULT FALSE, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255));
-CREATE TABLE common.ocean(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ocean PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE NOT NULL, code VARCHAR(255), uri VARCHAR(255), status INTEGER DEFAULT 1, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
-CREATE TABLE common.organism(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_organism PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE NOT NULL, code VARCHAR(255), uri VARCHAR(255), status INTEGER DEFAULT 1, description VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), country VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
-CREATE TABLE common.person(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_person PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE NOT NULL, code VARCHAR(255), lastname VARCHAR(255), firstname VARCHAR(255), uri VARCHAR(255), status INTEGER DEFAULT 1, observer BOOLEAN DEFAULT FALSE, captain BOOLEAN DEFAULT FALSE, dataentryoperator BOOLEAN DEFAULT FALSE, needcomment BOOLEAN DEFAULT FALSE, country VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, datasource BOOLEAN DEFAULT FALSE);
-CREATE TABLE common.program(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_program PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE NOT NULL, code VARCHAR(255), uri VARCHAR(255), status INTEGER DEFAULT 1, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), nontargetobservation INTEGER, targetdiscardsobservation INTEGER, samplesobservation INTEGER, objectsobservation INTEGER, detailledactivitiesobservation INTEGER, mammalsobservation INTEGER, birdsobservation INTEGER, baitobservation INTEGER, startdate TIMESTAMP, enddate TIMESTAMP, comment VARCHAR(1025), organism VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, geartype INTEGER, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
-CREATE TABLE common.sex(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_sex PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
-CREATE TABLE common.shipowner(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ship_owner PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE NOT NULL, lastupdatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, needcomment BOOLEAN DEFAULT FALSE, uri VARCHAR(255), label VARCHAR(255), country VARCHAR(255), startdate DATE, enddate DATE);
-CREATE TABLE common.sizemeasuretype(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_sizemeasuretype PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE NOT NULL, lastupdatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, needcomment BOOLEAN DEFAULT FALSE, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255));
-CREATE TABLE common.speciesgroup(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_speciesgroup PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE NOT NULL, code VARCHAR(255), uri VARCHAR(255), status INTEGER DEFAULT 1, needcomment BOOLEAN, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
-CREATE TABLE common.species(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_species PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE NOT NULL, code VARCHAR(255), homeid VARCHAR(255), wormsid BIGINT, uri VARCHAR(255), status INTEGER DEFAULT 1, faocode VARCHAR(255), needcomment BOOLEAN, scientificlabel VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), minlength NUMERIC, maxlength NUMERIC, minweight NUMERIC, maxweight NUMERIC, speciesgroup VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, sizemeasuretype VARCHAR(255));
-CREATE TABLE common.lengthlengthparameter(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_lengthlengthparameter PRIMARY KEY, topiaversion BIGINT NOT NULL, inputsizemeasuretype VARCHAR(255) NOT NULL, outputsizemeasuretype VARCHAR(255) NOT NULL, topiacreatedate DATE NOT NULL, uri VARCHAR(255), status INTEGER DEFAULT 1, coefficients VARCHAR(255) NOT NULL, inputoutputformula VARCHAR(255) NOT NULL, outputinputformula VARCHAR(255) NOT NULL, code VARCHAR(255) DEFAULT 0, needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, source VARCHAR(1025), species VARCHAR(255) NOT NULL, ocean VARCHAR(255) NOT NULL, sex VARCHAR(255) NOT NULL, startdate DATE, enddate DATE);
-CREATE TABLE common.lengthweightparameter(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_lengthweightparameter PRIMARY KEY, topiaversion BIGINT NOT NULL, ocean VARCHAR(255) NOT NULL, species VARCHAR(255) NOT NULL, topiacreatedate DATE NOT NULL, uri VARCHAR(255), status INTEGER DEFAULT 1, startdate TIMESTAMP, enddate TIMESTAMP, coefficients VARCHAR(255) NOT NULL, lengthweightformula VARCHAR(255) NOT NULL, weightlengthformula VARCHAR(255) NOT NULL, meanlength NUMERIC, meanweight NUMERIC, sex VARCHAR(255) NOT NULL, code VARCHAR(255) DEFAULT 0, needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, source VARCHAR(1025), sizemeasuretype VARCHAR(255) NOT NULL);
-CREATE TABLE common.speciesgroupreleasemode(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_species_group_release_mode PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE NOT NULL, lastupdatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, needcomment BOOLEAN DEFAULT FALSE, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255));
-CREATE TABLE common.specieslist(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_specieslist PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
-CREATE TABLE common.vesselsizecategory(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_vesselsizecategory PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE NOT NULL, code VARCHAR(255), uri VARCHAR(255), status INTEGER DEFAULT 1, capacitylabel VARCHAR(255), gaugelabel VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
-CREATE TABLE common.vesseltype(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_vesseltype PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE NOT NULL, code VARCHAR(255), uri VARCHAR(255), status INTEGER DEFAULT 1, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
-CREATE TABLE common.vessel(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_vessel PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE NOT NULL, code VARCHAR(255), keelcode INTEGER, fleetcountry INTEGER, changedate TIMESTAMP, yearservice INTEGER, length NUMERIC, capacity NUMERIC, power INTEGER, searchmaximum NUMERIC, uri VARCHAR(255), status INTEGER DEFAULT 1, comment VARCHAR(1025), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), flagcountry VARCHAR(255), vesseltype VARCHAR(255), vesselsizecategory VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, comid VARCHAR(255), iotcId VARCHAR(255), iccat VARCHAR(255), imoid VARCHAR(255), nationalid VARCHAR(255), radiocallsignid VARCHAR(255), tuviid VARCHAR(255), shipowner VARCHAR(255));
-CREATE TABLE common.weightmeasuremethod(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_weightmeasuremethod PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE NOT NULL, lastupdatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, needcomment BOOLEAN DEFAULT FALSE, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255));
-CREATE TABLE common.weightmeasuretype(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_weightmeasuretype PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE NOT NULL, lastupdatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, needcomment BOOLEAN DEFAULT FALSE, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255));
-CREATE TABLE common.wind(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_wind PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE NOT NULL, code VARCHAR(255), speedrange VARCHAR(255), waveheight VARCHAR(255), uri VARCHAR(255), status INTEGER DEFAULT 1, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
+CREATE TABLE common.country(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_country PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), uri VARCHAR(255), iso2code VARCHAR(255), iso3code VARCHAR(255), status INTEGER DEFAULT 1, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
+CREATE TABLE common.dataquality(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_dataquality PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, lastupdatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, needcomment BOOLEAN DEFAULT FALSE, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255));
+CREATE TABLE common.fpazone(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_fpazone PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), startdate DATE, enddate DATE, needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
+CREATE TABLE common.gear(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_gear PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), needcomment BOOLEAN, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
+CREATE TABLE common.gearcaracteristictype(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_gearcaracteristictype PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), needcomment BOOLEAN, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
+CREATE TABLE common.gearcaracteristic(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_gearcaracteristic PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), needcomment BOOLEAN, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), unit VARCHAR(255), gearcaracteristictype VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
+CREATE TABLE common.harbour(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_harbour PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), needcomment BOOLEAN, locode VARCHAR(255), latitude NUMERIC, longitude NUMERIC, country VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, label1 VARCHAR(256), label2 VARCHAR(256), label3 VARCHAR(256), label4 VARCHAR(256), label5 VARCHAR(256), label6 VARCHAR(256), label7 VARCHAR(256), label8 VARCHAR(256));
+CREATE TABLE common.lastupdatedate(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_lastupdatedate PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, type VARCHAR(255) NOT NULL CONSTRAINT uk_lastupdatedate_type unique, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
+CREATE TABLE common.lengthmeasuremethod(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_lengthmeasuremethod PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, lastupdatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, needcomment BOOLEAN DEFAULT FALSE, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255));
+CREATE TABLE common.ocean(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ocean PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), uri VARCHAR(255), status INTEGER DEFAULT 1, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
+CREATE TABLE common.organism(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_organism PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), uri VARCHAR(255), status INTEGER DEFAULT 1, description VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), country VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
+CREATE TABLE common.person(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_person PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), lastname VARCHAR(255), firstname VARCHAR(255), uri VARCHAR(255), status INTEGER DEFAULT 1, observer BOOLEAN DEFAULT FALSE, captain BOOLEAN DEFAULT FALSE, dataentryoperator BOOLEAN DEFAULT FALSE, needcomment BOOLEAN DEFAULT FALSE, country VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, datasource BOOLEAN DEFAULT FALSE);
+CREATE TABLE common.program(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_program PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), uri VARCHAR(255), status INTEGER DEFAULT 1, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), nontargetobservation INTEGER, targetdiscardsobservation INTEGER, samplesobservation INTEGER, objectsobservation INTEGER, detailledactivitiesobservation INTEGER, mammalsobservation INTEGER, birdsobservation INTEGER, baitobservation INTEGER, startdate TIMESTAMP, enddate TIMESTAMP, comment VARCHAR(1025), organism VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, geartype INTEGER, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
+CREATE TABLE common.sex(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_sex PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
+CREATE TABLE common.shipowner(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ship_owner PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, lastupdatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, needcomment BOOLEAN DEFAULT FALSE, uri VARCHAR(255), label VARCHAR(255), country VARCHAR(255), startdate DATE, enddate DATE);
+CREATE TABLE common.sizemeasuretype(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_sizemeasuretype PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, lastupdatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, needcomment BOOLEAN DEFAULT FALSE, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255));
+CREATE TABLE common.speciesgroup(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_speciesgroup PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), uri VARCHAR(255), status INTEGER DEFAULT 1, needcomment BOOLEAN, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
+CREATE TABLE common.species(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_species PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), homeid VARCHAR(255), wormsid BIGINT, uri VARCHAR(255), status INTEGER DEFAULT 1, faocode VARCHAR(255), needcomment BOOLEAN, scientificlabel VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), minlength NUMERIC, maxlength NUMERIC, minweight NUMERIC, maxweight NUMERIC, speciesgroup VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, sizemeasuretype VARCHAR(255));
+CREATE TABLE common.lengthlengthparameter(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_lengthlengthparameter PRIMARY KEY, topiaversion BIGINT NOT NULL, inputsizemeasuretype VARCHAR(255) NOT NULL, outputsizemeasuretype VARCHAR(255) NOT NULL, topiacreatedate TIMESTAMP NOT NULL, uri VARCHAR(255), status INTEGER DEFAULT 1, coefficients VARCHAR(255) NOT NULL, inputoutputformula VARCHAR(255) NOT NULL, outputinputformula VARCHAR(255) NOT NULL, code VARCHAR(255) DEFAULT 0, needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, source VARCHAR(1025), species VARCHAR(255) NOT NULL, ocean VARCHAR(255) NOT NULL, sex VARCHAR(255) NOT NULL, startdate DATE, enddate DATE);
+CREATE TABLE common.lengthweightparameter(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_lengthweightparameter PRIMARY KEY, topiaversion BIGINT NOT NULL, ocean VARCHAR(255) NOT NULL, species VARCHAR(255) NOT NULL, topiacreatedate TIMESTAMP NOT NULL, uri VARCHAR(255), status INTEGER DEFAULT 1, startdate TIMESTAMP, enddate TIMESTAMP, coefficients VARCHAR(255) NOT NULL, lengthweightformula VARCHAR(255) NOT NULL, weightlengthformula VARCHAR(255) NOT NULL, meanlength NUMERIC, meanweight NUMERIC, sex VARCHAR(255) NOT NULL, code VARCHAR(255) DEFAULT 0, needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, source VARCHAR(1025), sizemeasuretype VARCHAR(255) NOT NULL);
+CREATE TABLE common.speciesgroupreleasemode(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_species_group_release_mode PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, lastupdatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, needcomment BOOLEAN DEFAULT FALSE, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255));
+CREATE TABLE common.specieslist(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_specieslist PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
+CREATE TABLE common.vesselsizecategory(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_vesselsizecategory PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), uri VARCHAR(255), status INTEGER DEFAULT 1, capacitylabel VARCHAR(255), gaugelabel VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
+CREATE TABLE common.vesseltype(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_vesseltype PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), uri VARCHAR(255), status INTEGER DEFAULT 1, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
+CREATE TABLE common.vessel(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_vessel PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), keelcode INTEGER, fleetcountry INTEGER, changedate TIMESTAMP, yearservice INTEGER, length NUMERIC, capacity NUMERIC, power INTEGER, searchmaximum NUMERIC, uri VARCHAR(255), status INTEGER DEFAULT 1, comment VARCHAR(1025), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), flagcountry VARCHAR(255), vesseltype VARCHAR(255), vesselsizecategory VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, comid VARCHAR(255), iotcId VARCHAR(255), iccat VARCHAR(255), imoid VARCHAR(255), nationalid VARCHAR(255), radiocallsignid VARCHAR(255), tuviid VARCHAR(255), shipowner VARCHAR(255));
+CREATE TABLE common.weightmeasuremethod(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_weightmeasuremethod PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, lastupdatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, needcomment BOOLEAN DEFAULT FALSE, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255));
+CREATE TABLE common.weightmeasuretype(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_weightmeasuretype PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, lastupdatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, needcomment BOOLEAN DEFAULT FALSE, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255));
+CREATE TABLE common.wind(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_wind PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), speedrange VARCHAR(255), waveheight VARCHAR(255), uri VARCHAR(255), status INTEGER DEFAULT 1, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
CREATE TABLE common.gear_gearcaracteristic(gear VARCHAR(255) NOT NULL, gearcaracteristic VARCHAR(255) NOT NULL);
CREATE TABLE common.ocean_species(species VARCHAR(255) NOT NULL, ocean VARCHAR(255) NOT NULL);
CREATE TABLE common.speciesgroup_speciesgroupreleasemode(speciesgroup VARCHAR(255) NOT NULL, speciesgroupreleasemode VARCHAR(255) NOT NULL);
=====================================
persistence/src/main/resources/db/migration/8.0/102_create_ps_common_schema-common.sql
=====================================
@@ -22,12 +22,12 @@
CREATE SCHEMA ps_common;
-CREATE TABLE ps_common.speciesfate(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_speciesfate PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP, code VARCHAR(255), needcomment BOOLEAN, uri VARCHAR(255), status INTEGER DEFAULT 1, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, discard BOOLEAN);
-CREATE TABLE ps_common.transmittingbuoyoperation(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_transmittingbuoyoperation PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP, code VARCHAR(255), uri VARCHAR(255), status INTEGER DEFAULT 1, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
-CREATE TABLE ps_common.transmittingbuoytype(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_transmittingbuoytype PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP, code VARCHAR(255), needcomment BOOLEAN, uri VARCHAR(255), status INTEGER DEFAULT 1, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
-CREATE TABLE ps_common.vesselactivity(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_vesselactivity PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP, code VARCHAR(255), uri VARCHAR(255), needcomment BOOLEAN, status INTEGER DEFAULT 1, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, allowfad BOOLEAN DEFAULT FALSE NOT NULL);
+CREATE TABLE ps_common.speciesfate(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_speciesfate PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), needcomment BOOLEAN, uri VARCHAR(255), status INTEGER DEFAULT 1, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, discard BOOLEAN);
+CREATE TABLE ps_common.transmittingbuoyoperation(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_transmittingbuoyoperation PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), uri VARCHAR(255), status INTEGER DEFAULT 1, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
+CREATE TABLE ps_common.transmittingbuoytype(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_transmittingbuoytype PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), needcomment BOOLEAN, uri VARCHAR(255), status INTEGER DEFAULT 1, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
+CREATE TABLE ps_common.vesselactivity(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_vesselactivity PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), uri VARCHAR(255), needcomment BOOLEAN, status INTEGER DEFAULT 1, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, allowfad BOOLEAN DEFAULT FALSE NOT NULL);
-CREATE TABLE ps_common.trip( topiaid varchar(255) not null constraint pk_trip primary key, topiaversion BIGINT not null, topiacreatedate TIMESTAMP, startdate DATE, enddate DATE, comment VARCHAR(1025), checklevel INTEGER, formsurl varchar(255), reportsurl varchar(255), historicaldata BOOLEAN, ersid varchar(255), ocean varchar(255), observer varchar(255), vessel varchar(255), program varchar(255), captain varchar(255), dataentryoperator varchar(255), departureharbour varchar(255), landingharbour varchar(255), lastupdatedate TIMESTAMP default now() not null, dataquality varchar(255));
+CREATE TABLE ps_common.trip( topiaid varchar(255) not null constraint pk_trip primary key, topiaversion BIGINT not null, topiacreatedate TIMESTAMP NOT NULL, startdate DATE, enddate DATE, comment VARCHAR(1025), checklevel INTEGER, formsurl varchar(255), reportsurl varchar(255), historicaldata BOOLEAN, ersid varchar(255), ocean varchar(255), observer varchar(255), vessel varchar(255), program varchar(255), captain varchar(255), dataentryoperator varchar(255), departureharbour varchar(255), landingharbour varchar(255), lastupdatedate TIMESTAMP default now() not null, dataquality varchar(255));
CREATE TABLE ps_common.gearusefeatures( topiaid varchar(255) not null constraint pk_gearusefeatures primary key, topiaversion BIGINT not null, topiacreatedate DATE, trip varchar(255), gear varchar(255) not null, number INTEGER not null, comment VARCHAR(1025), usedintrip BOOLEAN, lastupdatedate TIMESTAMP default now() not null );
CREATE TABLE ps_common.gearusefeaturesmeasurement( topiaid varchar(255) not null constraint pk_gearusefeaturesmeasurement primary key, topiaversion BIGINT not null, topiacreatedate DATE, gearcaracteristic varchar(255) not null, gearusefeatures varchar(255), measurementvalue varchar(255) not null, lastupdatedate TIMESTAMP default now() not null );
=====================================
persistence/src/main/resources/db/migration/8.0/103_create_ps_observation_schema-common.sql
=====================================
@@ -22,36 +22,36 @@
CREATE SCHEMA ps_observation;
-CREATE TABLE ps_observation.detectionmode(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_detectionmode PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP, code VARCHAR(255), needcomment BOOLEAN, uri VARCHAR(255), status INTEGER DEFAULT 1, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
-CREATE TABLE ps_observation.nontargetcatchreleaseconformity(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_nontargetcatchreleaseconformity PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE, lastupdatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, needcomment BOOLEAN DEFAULT FALSE, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255));
-CREATE TABLE ps_observation.nontargetcatchreleasestatus(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_nontargetcatchreleasestatus PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE, lastupdatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, needcomment BOOLEAN DEFAULT FALSE, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255));
-CREATE TABLE ps_observation.nontargetcatchreleasingtime(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_nontargetcatchreleasingtime PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE, lastupdatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, needcomment BOOLEAN DEFAULT FALSE, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255));
-CREATE TABLE ps_observation.objectmaterialtype(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_object_material_type PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE, lastupdatedate TIMESTAMP NOT NULL, code VARCHAR(255) NOT NULL, status INTEGER DEFAULT 1, needcomment BOOLEAN DEFAULT FALSE, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255));
-CREATE TABLE ps_observation.objectmaterial(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_object_material PRIMARY KEY,topiaversion BIGINT NOT NULL,topiacreatedate DATE,lastupdatedate TIMESTAMP NOT NULL,code VARCHAR(255) NOT NULL,legacycode VARCHAR(1025),standardcode VARCHAR(255),parent VARCHAR(255),status INTEGER DEFAULT 1,needcomment BOOLEAN DEFAULT FALSE,uri VARCHAR(255),objectmaterialtype VARCHAR(255),biodegradable BOOLEAN,nonentangling BOOLEAN,label1 VARCHAR(255),label2 VARCHAR(255),label3 VARCHAR(255),label4 VARCHAR(255),label5 VARCHAR(255),label6 VARCHAR(255),label7 VARCHAR(255),label8 VARCHAR(255),childrenmultiselectable BOOLEAN,childselectionmandatory BOOLEAN,validation VARCHAR(255));
-CREATE TABLE ps_observation.objectoperation(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_objectoperation PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP, code VARCHAR(255), uri VARCHAR(255), status INTEGER DEFAULT 1, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, whenarriving BOOLEAN DEFAULT TRUE, whenleaving BOOLEAN DEFAULT TRUE);
-CREATE TABLE ps_observation.observedsystem(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_observedsystem PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP, code VARCHAR(255), needcomment BOOLEAN, uri VARCHAR(255), status INTEGER DEFAULT 1, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), schooltype INTEGER, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
-CREATE TABLE ps_observation.reasonfordiscard(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_reasonfordiscard PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP, code VARCHAR(255), needcomment BOOLEAN, uri VARCHAR(255), status INTEGER DEFAULT 1, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
-CREATE TABLE ps_observation.reasonfornofishing(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_reasonfornofishing PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP, code VARCHAR(255), needcomment BOOLEAN, uri VARCHAR(255), status INTEGER DEFAULT 1, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
-CREATE TABLE ps_observation.reasonfornullset(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_reasonfornullset PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP, code VARCHAR(255), needcomment BOOLEAN, uri VARCHAR(255), status INTEGER DEFAULT 1, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
-CREATE TABLE ps_observation.set(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_set PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP, starttime TIME, endpursingtimestamp TIMESTAMP, endsettimestamp TIMESTAMP, maxgeardepth INTEGER, currentspeed NUMERIC, currentdirection INTEGER, schooltopdepth INTEGER, schoolmeandepth INTEGER, schoolthickness INTEGER, supportvesselname VARCHAR(255), targetdiscarded BOOLEAN, nontargetdiscarded BOOLEAN, comment VARCHAR(1025), schooltype INTEGER, currentmeasuredepth INTEGER, reasonfornullset VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, targetcatchcompositionestimatedbyobserver BOOLEAN DEFAULT FALSE, targetdiscardcatchcompositionestimatedbyobserver BOOLEAN DEFAULT FALSE);
-CREATE TABLE ps_observation.nontargetcatchrelease(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_non_target_catch_release PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE, lastupdatedate TIMESTAMP NOT NULL, length NUMERIC, count INTEGER, acquisitionmode INTEGER, comment VARCHAR(1025), species VARCHAR(255), sex VARCHAR(255), speciesgroupreleasemode VARCHAR(255), set VARCHAR(255), set_idx INTEGER, status VARCHAR(255) NOT NULL, conformity VARCHAR(255), releasingtime VARCHAR(255), lengthmeasuremethod VARCHAR(255));
-CREATE TABLE ps_observation.nontargetsample(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_nontargetsample PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP, comment VARCHAR(1025), set VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
-CREATE TABLE ps_observation.schoolestimate(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_schoolestimate PRIMARY KEY, topiaversion BIGINT NOT NULL, set VARCHAR(255) NOT NULL, species VARCHAR(255) NOT NULL, topiacreatedate TIMESTAMP, totalweight INTEGER, meanweight INTEGER, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, weightmeasuremethod VARCHAR(255), CONSTRAINT uk_schoolestimate_species_set unique(species, set));
-CREATE TABLE ps_observation.nontargetcatch(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_nontargetcatch PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP, catchweight NUMERIC, catchweightcomputedsource INTEGER, meanweight NUMERIC, meanweightcomputedsource INTEGER, meanlength NUMERIC, meanlengthcomputedsource INTEGER, totalcount INTEGER, totalcountcomputedsource INTEGER, comment VARCHAR(1025), reasonfordiscard VARCHAR(255), species VARCHAR(255), speciesfate VARCHAR(255), set VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, well VARCHAR(255), set_idx INTEGER, lengthmeasuremethod VARCHAR(255), weightmeasuremethod VARCHAR(255));
-CREATE TABLE ps_observation.nontargetlength(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_nontargetlength PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP, length NUMERIC, islengthcomputed BOOLEAN, picturesreferences VARCHAR(255), weight NUMERIC, isweightcomputed BOOLEAN, count INTEGER, acquisitionmode INTEGER, species VARCHAR(255), nontargetsample VARCHAR(255), sex VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, sizemeasuretype VARCHAR(255), tagnumber VARCHAR(255), speciesfate VARCHAR(255), nontargetsample_idx INTEGER, lengthmeasuremethod VARCHAR(255), weightmeasuremethod VARCHAR(255));
-CREATE TABLE ps_observation.speciesstatus(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_speciesstatus PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP, code VARCHAR(255), uri VARCHAR(255), status INTEGER DEFAULT 1, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
-CREATE TABLE ps_observation.surroundingactivity(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_surroundingactivity PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP, code VARCHAR(255), uri VARCHAR(255), status INTEGER DEFAULT 1, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
-CREATE TABLE ps_observation.targetsample(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_targetsample PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP, nature VARCHAR(255), comment VARCHAR(1025), discarded BOOLEAN, set VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
-CREATE TABLE ps_observation.targetlength(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_targetlength PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP, length NUMERIC, islengthcomputed BOOLEAN, count INTEGER, weight NUMERIC, isweightcomputed BOOLEAN, acquisitionmode INTEGER, targetsample VARCHAR(255), species VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, sizemeasuretype VARCHAR(255), sex VARCHAR(255), tagnumber VARCHAR(255), targetsample_idx INTEGER, lengthmeasuremethod VARCHAR(255), weightmeasuremethod VARCHAR(255));
-CREATE TABLE ps_observation.route(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_route PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP, date DATE, startlogvalue NUMERIC, endlogvalue NUMERIC, comment VARCHAR(1025), checklevel INTEGER, trip VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
-CREATE TABLE ps_observation.activity(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_activity PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP, time TIME, latitude NUMERIC, longitude NUMERIC, vesselspeed NUMERIC, seasurfacetemperature NUMERIC, observedsystemdistance NUMERIC, comment VARCHAR(1025), vesselactivity VARCHAR(255), surroundingactivity VARCHAR(255), wind VARCHAR(255), detectionmode VARCHAR(255), reasonfornofishing VARCHAR(255), set VARCHAR(255), route VARCHAR(255), currentfpazone VARCHAR(255), previousfpazone VARCHAR(255), nextfpazone VARCHAR(255), ersid VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, dataquality VARCHAR(255));
-CREATE TABLE ps_observation.floatingobject(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_floatingobject PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP, comment VARCHAR(1025), supportvesselname VARCHAR(255), activity VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, objectoperation VARCHAR(256), computedwhenarrivingbiodegradable VARCHAR(255), computedwhenarrivingnonentangling VARCHAR(255), computedwhenarrivingsimplifiedobjecttype VARCHAR(255), computedwhenleavingbiodegradable VARCHAR(255), computedwhenleavingnonentangling VARCHAR(255), computedwhenleavingsimplifiedobjecttype VARCHAR(255));
-CREATE TABLE ps_observation.floatingobjectpart(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_floating_object_part PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE, lastupdatedate TIMESTAMP NOT NULL, objectmaterial VARCHAR(255) NOT NULL, floatingobject VARCHAR(255) NOT NULL, whenarriving VARCHAR(255), whenleaving VARCHAR(255));
-CREATE TABLE ps_observation.objectobservedspecies(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_objectobservedspecies PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP, count INTEGER, statut INTEGER, species VARCHAR(255), speciesstatus VARCHAR(255), floatingobject VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
-CREATE TABLE ps_observation.objectschoolestimate(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_objectschoolestimate PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP, totalweight INTEGER, species VARCHAR(255), floatingobject VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, weightmeasuremethod VARCHAR(255));
-CREATE TABLE ps_observation.transmittingbuoy(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_transmittingbuoy PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP, code VARCHAR(255), brand VARCHAR(255), ownership INTEGER, transmittingbuoytype VARCHAR(255), transmittingbuoyoperation VARCHAR(255), floatingobject VARCHAR(255), country VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
-CREATE TABLE ps_observation.weightcategory(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_weightcategory PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP, code VARCHAR(255), uri VARCHAR(255), status INTEGER DEFAULT 1, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), species VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
-CREATE TABLE ps_observation.targetcatch(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_targetcatch PRIMARY KEY, topiaversion BIGINT NOT NULL, well VARCHAR(255), discarded BOOLEAN NOT NULL, set VARCHAR(255) NOT NULL, weightcategory VARCHAR(255) NOT NULL, reasonfordiscard VARCHAR(255), topiacreatedate TIMESTAMP, catchweight NUMERIC, broughtondeck BOOLEAN, comment VARCHAR(1025), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, set_idx INTEGER, weightmeasuremethod VARCHAR(255), CONSTRAINT uk_targetcatch_well_reasonfordiscard_weightcategory_discarded_s unique(well, reasonfordiscard, weightcategory, discarded, set));
+CREATE TABLE ps_observation.detectionmode(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_detectionmode PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), needcomment BOOLEAN, uri VARCHAR(255), status INTEGER DEFAULT 1, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
+CREATE TABLE ps_observation.nontargetcatchreleaseconformity(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_nontargetcatchreleaseconformity PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, lastupdatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, needcomment BOOLEAN DEFAULT FALSE, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255));
+CREATE TABLE ps_observation.nontargetcatchreleasestatus(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_nontargetcatchreleasestatus PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, lastupdatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, needcomment BOOLEAN DEFAULT FALSE, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255));
+CREATE TABLE ps_observation.nontargetcatchreleasingtime(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_nontargetcatchreleasingtime PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, lastupdatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, needcomment BOOLEAN DEFAULT FALSE, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255));
+CREATE TABLE ps_observation.objectmaterialtype(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_object_material_type PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, lastupdatedate TIMESTAMP NOT NULL, code VARCHAR(255) NOT NULL, status INTEGER DEFAULT 1, needcomment BOOLEAN DEFAULT FALSE, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255));
+CREATE TABLE ps_observation.objectmaterial(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_object_material PRIMARY KEY,topiaversion BIGINT NOT NULL,topiacreatedate TIMESTAMP NOT NULL,lastupdatedate TIMESTAMP NOT NULL,code VARCHAR(255) NOT NULL,legacycode VARCHAR(1025),standardcode VARCHAR(255),parent VARCHAR(255),status INTEGER DEFAULT 1,needcomment BOOLEAN DEFAULT FALSE,uri VARCHAR(255),objectmaterialtype VARCHAR(255),biodegradable BOOLEAN,nonentangling BOOLEAN,label1 VARCHAR(255),label2 VARCHAR(255),label3 VARCHAR(255),label4 VARCHAR(255),label5 VARCHAR(255),label6 VARCHAR(255),label7 VARCHAR(255),label8 VARCHAR(255),childrenmultiselectable BOOLEAN,childselectionmandatory BOOLEAN,validation VARCHAR(255));
+CREATE TABLE ps_observation.objectoperation(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_objectoperation PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), uri VARCHAR(255), status INTEGER DEFAULT 1, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, whenarriving BOOLEAN DEFAULT TRUE, whenleaving BOOLEAN DEFAULT TRUE);
+CREATE TABLE ps_observation.observedsystem(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_observedsystem PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), needcomment BOOLEAN, uri VARCHAR(255), status INTEGER DEFAULT 1, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), schooltype INTEGER, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
+CREATE TABLE ps_observation.reasonfordiscard(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_reasonfordiscard PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), needcomment BOOLEAN, uri VARCHAR(255), status INTEGER DEFAULT 1, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
+CREATE TABLE ps_observation.reasonfornofishing(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_reasonfornofishing PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), needcomment BOOLEAN, uri VARCHAR(255), status INTEGER DEFAULT 1, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
+CREATE TABLE ps_observation.reasonfornullset(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_reasonfornullset PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), needcomment BOOLEAN, uri VARCHAR(255), status INTEGER DEFAULT 1, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
+CREATE TABLE ps_observation.set(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_set PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, starttime TIME, endpursingtimestamp TIMESTAMP, endsettimestamp TIMESTAMP, maxgeardepth INTEGER, currentspeed NUMERIC, currentdirection INTEGER, schooltopdepth INTEGER, schoolmeandepth INTEGER, schoolthickness INTEGER, supportvesselname VARCHAR(255), targetdiscarded BOOLEAN, nontargetdiscarded BOOLEAN, comment VARCHAR(1025), schooltype INTEGER, currentmeasuredepth INTEGER, reasonfornullset VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, targetcatchcompositionestimatedbyobserver BOOLEAN DEFAULT FALSE, targetdiscardcatchcompositionestimatedbyobserver BOOLEAN DEFAULT FALSE);
+CREATE TABLE ps_observation.nontargetcatchrelease(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_non_target_catch_release PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, lastupdatedate TIMESTAMP NOT NULL, length NUMERIC, count INTEGER, acquisitionmode INTEGER, comment VARCHAR(1025), species VARCHAR(255), sex VARCHAR(255), speciesgroupreleasemode VARCHAR(255), set VARCHAR(255), set_idx INTEGER, status VARCHAR(255) NOT NULL, conformity VARCHAR(255), releasingtime VARCHAR(255), lengthmeasuremethod VARCHAR(255));
+CREATE TABLE ps_observation.nontargetsample(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_nontargetsample PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, comment VARCHAR(1025), set VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
+CREATE TABLE ps_observation.schoolestimate(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_schoolestimate PRIMARY KEY, topiaversion BIGINT NOT NULL, set VARCHAR(255) NOT NULL, species VARCHAR(255) NOT NULL, topiacreatedate TIMESTAMP NOT NULL, totalweight INTEGER, meanweight INTEGER, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, weightmeasuremethod VARCHAR(255), CONSTRAINT uk_schoolestimate_species_set unique(species, set));
+CREATE TABLE ps_observation.nontargetcatch(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_nontargetcatch PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, catchweight NUMERIC, catchweightcomputedsource INTEGER, meanweight NUMERIC, meanweightcomputedsource INTEGER, meanlength NUMERIC, meanlengthcomputedsource INTEGER, totalcount INTEGER, totalcountcomputedsource INTEGER, comment VARCHAR(1025), reasonfordiscard VARCHAR(255), species VARCHAR(255), speciesfate VARCHAR(255), set VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, well VARCHAR(255), set_idx INTEGER, lengthmeasuremethod VARCHAR(255), weightmeasuremethod VARCHAR(255));
+CREATE TABLE ps_observation.nontargetlength(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_nontargetlength PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, length NUMERIC, islengthcomputed BOOLEAN, picturesreferences VARCHAR(255), weight NUMERIC, isweightcomputed BOOLEAN, count INTEGER, acquisitionmode INTEGER, species VARCHAR(255), nontargetsample VARCHAR(255), sex VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, sizemeasuretype VARCHAR(255), tagnumber VARCHAR(255), speciesfate VARCHAR(255), nontargetsample_idx INTEGER, lengthmeasuremethod VARCHAR(255), weightmeasuremethod VARCHAR(255));
+CREATE TABLE ps_observation.speciesstatus(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_speciesstatus PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), uri VARCHAR(255), status INTEGER DEFAULT 1, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
+CREATE TABLE ps_observation.surroundingactivity(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_surroundingactivity PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), uri VARCHAR(255), status INTEGER DEFAULT 1, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
+CREATE TABLE ps_observation.targetsample(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_targetsample PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, nature VARCHAR(255), comment VARCHAR(1025), discarded BOOLEAN, set VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
+CREATE TABLE ps_observation.targetlength(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_targetlength PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, length NUMERIC, islengthcomputed BOOLEAN, count INTEGER, weight NUMERIC, isweightcomputed BOOLEAN, acquisitionmode INTEGER, targetsample VARCHAR(255), species VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, sizemeasuretype VARCHAR(255), sex VARCHAR(255), tagnumber VARCHAR(255), targetsample_idx INTEGER, lengthmeasuremethod VARCHAR(255), weightmeasuremethod VARCHAR(255));
+CREATE TABLE ps_observation.route(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_route PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, date DATE, startlogvalue NUMERIC, endlogvalue NUMERIC, comment VARCHAR(1025), checklevel INTEGER, trip VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
+CREATE TABLE ps_observation.activity(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_activity PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, time TIME, latitude NUMERIC, longitude NUMERIC, vesselspeed NUMERIC, seasurfacetemperature NUMERIC, observedsystemdistance NUMERIC, comment VARCHAR(1025), vesselactivity VARCHAR(255), surroundingactivity VARCHAR(255), wind VARCHAR(255), detectionmode VARCHAR(255), reasonfornofishing VARCHAR(255), set VARCHAR(255), route VARCHAR(255), currentfpazone VARCHAR(255), previousfpazone VARCHAR(255), nextfpazone VARCHAR(255), ersid VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, dataquality VARCHAR(255));
+CREATE TABLE ps_observation.floatingobject(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_floatingobject PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, comment VARCHAR(1025), supportvesselname VARCHAR(255), activity VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, objectoperation VARCHAR(256), computedwhenarrivingbiodegradable VARCHAR(255), computedwhenarrivingnonentangling VARCHAR(255), computedwhenarrivingsimplifiedobjecttype VARCHAR(255), computedwhenleavingbiodegradable VARCHAR(255), computedwhenleavingnonentangling VARCHAR(255), computedwhenleavingsimplifiedobjecttype VARCHAR(255));
+CREATE TABLE ps_observation.floatingobjectpart(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_floating_object_part PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, lastupdatedate TIMESTAMP NOT NULL, objectmaterial VARCHAR(255) NOT NULL, floatingobject VARCHAR(255) NOT NULL, whenarriving VARCHAR(255), whenleaving VARCHAR(255));
+CREATE TABLE ps_observation.objectobservedspecies(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_objectobservedspecies PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, count INTEGER, statut INTEGER, species VARCHAR(255), speciesstatus VARCHAR(255), floatingobject VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
+CREATE TABLE ps_observation.objectschoolestimate(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_objectschoolestimate PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, totalweight INTEGER, species VARCHAR(255), floatingobject VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, weightmeasuremethod VARCHAR(255));
+CREATE TABLE ps_observation.transmittingbuoy(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_transmittingbuoy PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), brand VARCHAR(255), ownership INTEGER, transmittingbuoytype VARCHAR(255), transmittingbuoyoperation VARCHAR(255), floatingobject VARCHAR(255), country VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
+CREATE TABLE ps_observation.weightcategory(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_weightcategory PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), uri VARCHAR(255), status INTEGER DEFAULT 1, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), species VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
+CREATE TABLE ps_observation.targetcatch(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_observation_targetcatch PRIMARY KEY, topiaversion BIGINT NOT NULL, well VARCHAR(255), discarded BOOLEAN NOT NULL, set VARCHAR(255) NOT NULL, weightcategory VARCHAR(255) NOT NULL, reasonfordiscard VARCHAR(255), topiacreatedate TIMESTAMP NOT NULL, catchweight NUMERIC, broughtondeck BOOLEAN, comment VARCHAR(1025), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, set_idx INTEGER, weightmeasuremethod VARCHAR(255), CONSTRAINT uk_targetcatch_well_reasonfordiscard_weightcategory_discarded_s unique(well, reasonfordiscard, weightcategory, discarded, set));
CREATE TABLE ps_observation.activity_observedsystem(activity VARCHAR(255) NOT NULL, observedsystem VARCHAR(255) NOT NULL, CONSTRAINT pk_ps_observation_activity_observedsystem PRIMARY KEY(activity, observedsystem));
=====================================
persistence/src/main/resources/db/migration/8.0/104_create_ll_common_schema-common.sql
=====================================
@@ -22,28 +22,28 @@
CREATE SCHEMA ll_common;
-CREATE TABLE ll_common.baitsettingstatus(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate DATE, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, CONSTRAINT pk_ll_common_baitsettingstatus primary key(topiaid));
-CREATE TABLE ll_common.baittype(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate DATE, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, CONSTRAINT pk_ll_common_baittype primary key(topiaid));
-CREATE TABLE ll_common.catchfate(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate DATE, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, CONSTRAINT pk_ll_common_catchfate primary key(topiaid));
-CREATE TABLE ll_common.healthness(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate DATE, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, CONSTRAINT pk_ll_common_healthness primary key(topiaid));
-CREATE TABLE ll_common.hooksize(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate DATE, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, CONSTRAINT pk_ll_common_hooksize primary key(topiaid));
-CREATE TABLE ll_common.hooktype(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate DATE, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, CONSTRAINT pk_ll_common_hooktype primary key(topiaid));
-CREATE TABLE ll_common.lightstickscolor(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate DATE, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, CONSTRAINT pk_ll_common_lightstickscolor primary key(topiaid));
-CREATE TABLE ll_common.lightstickstype(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate DATE, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, CONSTRAINT pk_ll_common_lightstickstype primary key(topiaid));
-CREATE TABLE ll_common.linetype(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate DATE, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, CONSTRAINT pk_ll_common_linetype primary key(topiaid));
-CREATE TABLE ll_common.mitigationtype(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate DATE, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, CONSTRAINT pk_ll_common_mitigationtype primary key(topiaid));
-CREATE TABLE ll_common.observationmethod(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate DATE, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, CONSTRAINT pk_ll_common_observationmethod primary key(topiaid));
-CREATE TABLE ll_common.onboardprocessing(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate DATE, lastupdatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, needcomment BOOLEAN DEFAULT FALSE, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), CONSTRAINT pk_ll_logbook_onboardprocessing primary key(topiaid));
+CREATE TABLE ll_common.baitsettingstatus(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, CONSTRAINT pk_ll_common_baitsettingstatus primary key(topiaid));
+CREATE TABLE ll_common.baittype(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, CONSTRAINT pk_ll_common_baittype primary key(topiaid));
+CREATE TABLE ll_common.catchfate(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, CONSTRAINT pk_ll_common_catchfate primary key(topiaid));
+CREATE TABLE ll_common.healthness(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, CONSTRAINT pk_ll_common_healthness primary key(topiaid));
+CREATE TABLE ll_common.hooksize(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, CONSTRAINT pk_ll_common_hooksize primary key(topiaid));
+CREATE TABLE ll_common.hooktype(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, CONSTRAINT pk_ll_common_hooktype primary key(topiaid));
+CREATE TABLE ll_common.lightstickscolor(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, CONSTRAINT pk_ll_common_lightstickscolor primary key(topiaid));
+CREATE TABLE ll_common.lightstickstype(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, CONSTRAINT pk_ll_common_lightstickstype primary key(topiaid));
+CREATE TABLE ll_common.linetype(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, CONSTRAINT pk_ll_common_linetype primary key(topiaid));
+CREATE TABLE ll_common.mitigationtype(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, CONSTRAINT pk_ll_common_mitigationtype primary key(topiaid));
+CREATE TABLE ll_common.observationmethod(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, CONSTRAINT pk_ll_common_observationmethod primary key(topiaid));
+CREATE TABLE ll_common.onboardprocessing(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, lastupdatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, needcomment BOOLEAN DEFAULT FALSE, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), CONSTRAINT pk_ll_logbook_onboardprocessing primary key(topiaid));
-CREATE TABLE ll_common.settingshape(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate DATE, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, CONSTRAINT pk_ll_common_settingshape primary key(topiaid));
-CREATE TABLE ll_common.triptype(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate DATE, lastupdatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, needcomment BOOLEAN DEFAULT FALSE, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), CONSTRAINT pk_ll_common_triptype primary key(topiaid));
-CREATE TABLE ll_common.vesselactivity(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate DATE, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, CONSTRAINT pk_ll_common_vesselactivity primary key(topiaid));
-CREATE TABLE ll_common.weightcategory(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate DATE, lastupdatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, needcomment BOOLEAN DEFAULT FALSE, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), CONSTRAINT pk_ll_common_weightcategory primary key(topiaid));
-CREATE TABLE ll_common.weightdeterminationmethod(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate DATE, lastupdatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, needcomment BOOLEAN DEFAULT FALSE, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), CONSTRAINT pk_ll_common_weightdeterminationmethod primary key(topiaid));
+CREATE TABLE ll_common.settingshape(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, CONSTRAINT pk_ll_common_settingshape primary key(topiaid));
+CREATE TABLE ll_common.triptype(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, lastupdatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, needcomment BOOLEAN DEFAULT FALSE, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), CONSTRAINT pk_ll_common_triptype primary key(topiaid));
+CREATE TABLE ll_common.vesselactivity(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, CONSTRAINT pk_ll_common_vesselactivity primary key(topiaid));
+CREATE TABLE ll_common.weightcategory(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, lastupdatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, needcomment BOOLEAN DEFAULT FALSE, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), CONSTRAINT pk_ll_common_weightcategory primary key(topiaid));
+CREATE TABLE ll_common.weightdeterminationmethod(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, lastupdatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, needcomment BOOLEAN DEFAULT FALSE, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), CONSTRAINT pk_ll_common_weightdeterminationmethod primary key(topiaid));
CREATE TABLE ll_common.trip(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP, observationscomment VARCHAR(255), startdate TIMESTAMP, enddate TIMESTAMP, homeid VARCHAR(255), observationmethod VARCHAR(255), observer VARCHAR(255), vessel VARCHAR(255), captain VARCHAR(255), observationsdataentryoperator VARCHAR(255), program VARCHAR(255), ocean VARCHAR(255), departureharbour VARCHAR(255), landingharbour VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, observationsdataquality VARCHAR(255), generalcomment VARCHAR(1025), triptype VARCHAR(255), ersid VARCHAR(255), noofcrewmembers INTEGER, observationsavailability BOOLEAN DEFAULT FALSE, logbookcomment VARCHAR(1025), logbookdataquality VARCHAR(255), logbookdataentryoperator VARCHAR(255), logbookavailability BOOLEAN DEFAULT FALSE, CONSTRAINT pk_ll_common_trip primary key(topiaid));
-CREATE TABLE ll_common.gearusefeatures(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate DATE, trip VARCHAR(255), gear VARCHAR(255) NOT NULL, number INTEGER NOT NULL, comment VARCHAR(1025), usedintrip BOOLEAN, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, CONSTRAINT pk_ll_common_gearusefeatures primary key(topiaid));
-CREATE TABLE ll_common.gearusefeaturesmeasurement(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate DATE, gearcaracteristic VARCHAR(255) NOT NULL, gearusefeatures VARCHAR(255), measurementvalue VARCHAR(255) NOT NULL, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, CONSTRAINT pk_ll_common_gearusefeaturesmeasurement primary key(topiaid));
+CREATE TABLE ll_common.gearusefeatures(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, trip VARCHAR(255), gear VARCHAR(255) NOT NULL, number INTEGER NOT NULL, comment VARCHAR(1025), usedintrip BOOLEAN, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, CONSTRAINT pk_ll_common_gearusefeatures primary key(topiaid));
+CREATE TABLE ll_common.gearusefeaturesmeasurement(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, gearcaracteristic VARCHAR(255) NOT NULL, gearusefeatures VARCHAR(255), measurementvalue VARCHAR(255) NOT NULL, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, CONSTRAINT pk_ll_common_gearusefeaturesmeasurement primary key(topiaid));
CREATE TABLE ll_common.species_trip(trip VARCHAR(255) NOT NULL, species VARCHAR(255) NOT NULL);
INSERT INTO ll_common.baitsettingstatus(topiaid, topiaversion, topiacreatedate, code, status, uri, label1, label2, label3, label4, label5, label6, label7, label8, needcomment, lastupdatedate) SELECT topiaid, topiaversion, topiacreatedate, code, status, uri, label1, label2, label3, label4, label5, label6, label7, label8, needcomment, lastupdatedate FROM observe_longline.baitsettingstatus;
=====================================
persistence/src/main/resources/db/migration/8.0/105_create_ll_observation_schema-common.sql
=====================================
@@ -22,16 +22,16 @@
CREATE SCHEMA ll_observation;
-CREATE TABLE ll_observation.baithaulingstatus(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate DATE, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, CONSTRAINT pk_ll_observation_baithaulingstatus primary key(topiaid));
-CREATE TABLE ll_observation.encountertype(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate DATE, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, CONSTRAINT pk_ll_observation_encountertype primary key(topiaid));
-CREATE TABLE ll_observation.hookposition(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate DATE, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, CONSTRAINT pk_ll_observation_hookposition primary key(topiaid));
-CREATE TABLE ll_observation.itemhorizontalposition(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate DATE, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, CONSTRAINT pk_ll_observation_itemhorizontalposition primary key(topiaid));
-CREATE TABLE ll_observation.itemverticalposition(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate DATE, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, CONSTRAINT pk_ll_observation_itemverticalposition primary key(topiaid));
-CREATE TABLE ll_observation.maturitystatus(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate DATE, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), lowervalue VARCHAR(255), uppervalue VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, CONSTRAINT pk_ll_observation_maturitystatus primary key(topiaid));
-CREATE TABLE ll_observation.sensorbrand(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate DATE, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), brandname VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, CONSTRAINT pk_ll_observation_sensorbrand primary key(topiaid));
-CREATE TABLE ll_observation.sensordataformat(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate DATE, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, CONSTRAINT pk_ll_observation_sensordataformat primary key(topiaid));
-CREATE TABLE ll_observation.sensortype(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate DATE, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, CONSTRAINT pk_ll_observation_sensortype primary key(topiaid));
-CREATE TABLE ll_observation.stomacfullness(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate DATE, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, CONSTRAINT pk_ll_observation_stomacfullness primary key(topiaid));
+CREATE TABLE ll_observation.baithaulingstatus(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, CONSTRAINT pk_ll_observation_baithaulingstatus primary key(topiaid));
+CREATE TABLE ll_observation.encountertype(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, CONSTRAINT pk_ll_observation_encountertype primary key(topiaid));
+CREATE TABLE ll_observation.hookposition(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, CONSTRAINT pk_ll_observation_hookposition primary key(topiaid));
+CREATE TABLE ll_observation.itemhorizontalposition(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, CONSTRAINT pk_ll_observation_itemhorizontalposition primary key(topiaid));
+CREATE TABLE ll_observation.itemverticalposition(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, CONSTRAINT pk_ll_observation_itemverticalposition primary key(topiaid));
+CREATE TABLE ll_observation.maturitystatus(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), lowervalue VARCHAR(255), uppervalue VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, CONSTRAINT pk_ll_observation_maturitystatus primary key(topiaid));
+CREATE TABLE ll_observation.sensorbrand(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), brandname VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, CONSTRAINT pk_ll_observation_sensorbrand primary key(topiaid));
+CREATE TABLE ll_observation.sensordataformat(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, CONSTRAINT pk_ll_observation_sensordataformat primary key(topiaid));
+CREATE TABLE ll_observation.sensortype(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, CONSTRAINT pk_ll_observation_sensortype primary key(topiaid));
+CREATE TABLE ll_observation.stomacfullness(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, CONSTRAINT pk_ll_observation_stomacfullness primary key(topiaid));
CREATE TABLE ll_observation.set(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP, comment VARCHAR(1025), settingstarttimestamp TIMESTAMP, settingstartlatitude NUMERIC, settingstartlongitude NUMERIC, settingendtimestamp TIMESTAMP, settingendlatitude NUMERIC, settingendlongitude NUMERIC, settingvesselspeed NUMERIC, shooterused BOOLEAN, shooterspeed NUMERIC, weightedswivel BOOLEAN, swivelweight NUMERIC, lightsticksperbasketcount INTEGER, branchlinesperbasketcount INTEGER, basketspersectioncount INTEGER, totalsectionscount INTEGER, maxdepthtargeted INTEGER, haulingdirectionsameassetting BOOLEAN, haulingstarttimestamp TIMESTAMP, haulingstartlatitude NUMERIC, haulingstartlongitude NUMERIC, haulingendtimestamp TIMESTAMP, haulingendlatitude NUMERIC, haulingendlongitude NUMERIC, haulingbreaks INTEGER, timebetweenhooks BIGINT, homeid VARCHAR(255), number INTEGER, weightedsnap BOOLEAN, snapweight NUMERIC, totalbasketscount INTEGER, totalhookscount INTEGER, settingshape VARCHAR(255), linetype VARCHAR(255), lightstickstype VARCHAR(255), lightstickscolor VARCHAR(255), monitored BOOLEAN, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, CONSTRAINT pk_ll_observation_set primary key(topiaid));
CREATE TABLE ll_observation.baitscomposition(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP, proportion INTEGER, individualsize INTEGER, individualweight NUMERIC, baitsettingstatus VARCHAR(255), baittype VARCHAR(255), set VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, CONSTRAINT pk_ll_observation_baitscomposition primary key(topiaid));
CREATE TABLE ll_observation.branchlinescomposition(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP, length NUMERIC, proportion INTEGER, tracelinetype VARCHAR(255), toptype VARCHAR(255), set VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, tracelinelength NUMERIC, CONSTRAINT pk_ll_observation_branchlinescomposition primary key(topiaid));
=====================================
persistence/src/main/resources/db/migration/8.0/106_create_ll_logbook_schema-common.sql
=====================================
@@ -22,15 +22,15 @@
CREATE SCHEMA ll_logbook;
-CREATE TABLE ll_logbook.set(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP, lastupdatedate TIMESTAMP NOT NULL, comment VARCHAR(1025), homeid VARCHAR(255), number INTEGER, basketspersectioncount INTEGER, branchlinesperbasketcount INTEGER, totalsectionscount INTEGER, totalbasketscount INTEGER, totalhookscount INTEGER, weightedsnap BOOLEAN, snapweight NUMERIC, weightedswivel BOOLEAN, swivelweight NUMERIC, totallightstickscount INTEGER, timebetweenhooks BIGINT, shooterused BOOLEAN, shooterspeed NUMERIC, maxdepthtargeted INTEGER, settingstarttimestamp TIMESTAMP, settingstartlatitude NUMERIC, settingstartlongitude NUMERIC, settingendtimestamp TIMESTAMP, settingendlatitude NUMERIC, settingendlongitude NUMERIC, settingvesselspeed NUMERIC, haulingdirectionsameassetting BOOLEAN, haulingstarttimestamp TIMESTAMP, haulingstartlatitude NUMERIC, haulingstartlongitude NUMERIC, haulingendtimestamp TIMESTAMP, haulingendlatitude NUMERIC, haulingendlongitude NUMERIC, haulingbreaks INTEGER, monitored BOOLEAN, lightsticksused BOOLEAN, lightstickscount INTEGER, totallinelength INTEGER, basketlinelength INTEGER, lengthbetweenbranchlines INTEGER, settingshape VARCHAR(255), linetype VARCHAR(255), lightstickstype VARCHAR(255), lightstickscolor VARCHAR(255), CONSTRAINT pk_ll_logbook_set primary key(topiaid));
-CREATE TABLE ll_logbook.baitscomposition(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP, lastupdatedate TIMESTAMP NOT NULL, proportion INTEGER, individualsize INTEGER, individualweight NUMERIC, baitsettingstatus VARCHAR(255), baittype VARCHAR(255), set VARCHAR(255), CONSTRAINT pk_ll_logbook_baitscomposition primary key(topiaid));
-CREATE TABLE ll_logbook.branchlinescomposition(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP, lastupdatedate TIMESTAMP NOT NULL, length NUMERIC, proportion INTEGER, tracelinelength NUMERIC, toptype VARCHAR(255), tracelinetype VARCHAR(255), set VARCHAR(255), CONSTRAINT pk_ll_logbook_branchlinescomposition primary key(topiaid));
-CREATE TABLE ll_logbook.catch(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP, lastupdatedate TIMESTAMP NOT NULL, comment VARCHAR(1025), homeid VARCHAR(255), count INTEGER, totalweight NUMERIC, hookwhendiscarded BOOLEAN, depredated BOOLEAN, beatdiameter NUMERIC, countdepredated INTEGER, depredatedproportion INTEGER, photoreferences VARCHAR(255), number INTEGER, acquisitionmode INTEGER, tagnumber VARCHAR(255), onboardprocessing VARCHAR(255), catchfate VARCHAR(255), discardhealthness VARCHAR(255), speciescatch VARCHAR(255), catchhealthness VARCHAR(255), weightmeasuremethod VARCHAR(255), set VARCHAR(255), set_idx INTEGER, CONSTRAINT pk_ll_logbook_catch primary key(topiaid));
-CREATE TABLE ll_logbook.floatlinescomposition(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP, lastupdatedate TIMESTAMP NOT NULL, length NUMERIC, proportion INTEGER, linetype VARCHAR(255), set VARCHAR(255), CONSTRAINT pk_ll_logbook_floatlinescomposition primary key(topiaid));
-CREATE TABLE ll_logbook.hookscomposition(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP, lastupdatedate TIMESTAMP NOT NULL, proportion INTEGER, hookoffset INTEGER, hooktype VARCHAR(255), hooksize VARCHAR(255), set VARCHAR(255), CONSTRAINT pk_ll_logbook_hookscomposition primary key(topiaid));
-CREATE TABLE ll_logbook.sample(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP, lastupdatedate TIMESTAMP NOT NULL, comment VARCHAR(1025), timestamp TIMESTAMP, latitude NUMERIC, longitude NUMERIC, trip VARCHAR(255), CONSTRAINT pk_ll_logbook_sample primary key(topiaid));
-CREATE TABLE ll_logbook.samplepart(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP, lastupdatedate TIMESTAMP NOT NULL, length NUMERIC, weight NUMERIC, count INTEGER, acquisitionmode INTEGER, tagnumber VARCHAR(255), species VARCHAR(255), sex VARCHAR(255), sizemeasuretype VARCHAR(255), lengthmeasuremethod VARCHAR(255), weightmeasuretype VARCHAR(255), weightmeasuremethod VARCHAR(255), sample VARCHAR(255), sample_idx INTEGER, CONSTRAINT pk_ll_logbook_samplepart primary key(topiaid));
-CREATE TABLE ll_logbook.activity(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP, lastupdatedate TIMESTAMP NOT NULL, comment VARCHAR(1025), timestamp TIMESTAMP, latitude NUMERIC, longitude NUMERIC, seasurfacetemperature NUMERIC, winddirection INTEGER, currentdirection INTEGER, currentspeed NUMERIC, set VARCHAR(255), vesselactivity VARCHAR(255), dataquality VARCHAR(255), wind VARCHAR(255), fpazone VARCHAR(255), relatedobservedactivity VARCHAR(255), trip VARCHAR(255), sample VARCHAR(255), windspeed NUMERIC, CONSTRAINT pk_ll_logbook_activity primary key(topiaid));
+CREATE TABLE ll_logbook.set(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, lastupdatedate TIMESTAMP NOT NULL, comment VARCHAR(1025), homeid VARCHAR(255), number INTEGER, basketspersectioncount INTEGER, branchlinesperbasketcount INTEGER, totalsectionscount INTEGER, totalbasketscount INTEGER, totalhookscount INTEGER, weightedsnap BOOLEAN, snapweight NUMERIC, weightedswivel BOOLEAN, swivelweight NUMERIC, totallightstickscount INTEGER, timebetweenhooks BIGINT, shooterused BOOLEAN, shooterspeed NUMERIC, maxdepthtargeted INTEGER, settingstarttimestamp TIMESTAMP, settingstartlatitude NUMERIC, settingstartlongitude NUMERIC, settingendtimestamp TIMESTAMP, settingendlatitude NUMERIC, settingendlongitude NUMERIC, settingvesselspeed NUMERIC, haulingdirectionsameassetting BOOLEAN, haulingstarttimestamp TIMESTAMP, haulingstartlatitude NUMERIC, haulingstartlongitude NUMERIC, haulingendtimestamp TIMESTAMP, haulingendlatitude NUMERIC, haulingendlongitude NUMERIC, haulingbreaks INTEGER, monitored BOOLEAN, lightsticksused BOOLEAN, lightstickscount INTEGER, totallinelength INTEGER, basketlinelength INTEGER, lengthbetweenbranchlines INTEGER, settingshape VARCHAR(255), linetype VARCHAR(255), lightstickstype VARCHAR(255), lightstickscolor VARCHAR(255), CONSTRAINT pk_ll_logbook_set primary key(topiaid));
+CREATE TABLE ll_logbook.baitscomposition(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, lastupdatedate TIMESTAMP NOT NULL, proportion INTEGER, individualsize INTEGER, individualweight NUMERIC, baitsettingstatus VARCHAR(255), baittype VARCHAR(255), set VARCHAR(255), CONSTRAINT pk_ll_logbook_baitscomposition primary key(topiaid));
+CREATE TABLE ll_logbook.branchlinescomposition(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, lastupdatedate TIMESTAMP NOT NULL, length NUMERIC, proportion INTEGER, tracelinelength NUMERIC, toptype VARCHAR(255), tracelinetype VARCHAR(255), set VARCHAR(255), CONSTRAINT pk_ll_logbook_branchlinescomposition primary key(topiaid));
+CREATE TABLE ll_logbook.catch(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, lastupdatedate TIMESTAMP NOT NULL, comment VARCHAR(1025), homeid VARCHAR(255), count INTEGER, totalweight NUMERIC, hookwhendiscarded BOOLEAN, depredated BOOLEAN, beatdiameter NUMERIC, countdepredated INTEGER, depredatedproportion INTEGER, photoreferences VARCHAR(255), number INTEGER, acquisitionmode INTEGER, tagnumber VARCHAR(255), onboardprocessing VARCHAR(255), catchfate VARCHAR(255), discardhealthness VARCHAR(255), speciescatch VARCHAR(255), catchhealthness VARCHAR(255), weightmeasuremethod VARCHAR(255), set VARCHAR(255), set_idx INTEGER, CONSTRAINT pk_ll_logbook_catch primary key(topiaid));
+CREATE TABLE ll_logbook.floatlinescomposition(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, lastupdatedate TIMESTAMP NOT NULL, length NUMERIC, proportion INTEGER, linetype VARCHAR(255), set VARCHAR(255), CONSTRAINT pk_ll_logbook_floatlinescomposition primary key(topiaid));
+CREATE TABLE ll_logbook.hookscomposition(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, lastupdatedate TIMESTAMP NOT NULL, proportion INTEGER, hookoffset INTEGER, hooktype VARCHAR(255), hooksize VARCHAR(255), set VARCHAR(255), CONSTRAINT pk_ll_logbook_hookscomposition primary key(topiaid));
+CREATE TABLE ll_logbook.sample(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, lastupdatedate TIMESTAMP NOT NULL, comment VARCHAR(1025), timestamp TIMESTAMP, latitude NUMERIC, longitude NUMERIC, trip VARCHAR(255), CONSTRAINT pk_ll_logbook_sample primary key(topiaid));
+CREATE TABLE ll_logbook.samplepart(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, lastupdatedate TIMESTAMP NOT NULL, length NUMERIC, weight NUMERIC, count INTEGER, acquisitionmode INTEGER, tagnumber VARCHAR(255), species VARCHAR(255), sex VARCHAR(255), sizemeasuretype VARCHAR(255), lengthmeasuremethod VARCHAR(255), weightmeasuretype VARCHAR(255), weightmeasuremethod VARCHAR(255), sample VARCHAR(255), sample_idx INTEGER, CONSTRAINT pk_ll_logbook_samplepart primary key(topiaid));
+CREATE TABLE ll_logbook.activity(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, lastupdatedate TIMESTAMP NOT NULL, comment VARCHAR(1025), timestamp TIMESTAMP, latitude NUMERIC, longitude NUMERIC, seasurfacetemperature NUMERIC, winddirection INTEGER, currentdirection INTEGER, currentspeed NUMERIC, set VARCHAR(255), vesselactivity VARCHAR(255), dataquality VARCHAR(255), wind VARCHAR(255), fpazone VARCHAR(255), relatedobservedactivity VARCHAR(255), trip VARCHAR(255), sample VARCHAR(255), windspeed NUMERIC, CONSTRAINT pk_ll_logbook_activity primary key(topiaid));
CREATE TABLE ll_logbook.mitigationtype_set(set VARCHAR(255), mitigationtype VARCHAR(255) NOT NULL);
CREATE TABLE ll_logbook.catch_predator(catch VARCHAR(255), predator VARCHAR(255) NOT NULL);
=====================================
persistence/src/main/resources/db/migration/8.0/107_create_ll_landing_schema-common.sql
=====================================
@@ -23,10 +23,10 @@
CREATE SCHEMA ll_landing;
CREATE TABLE ll_landing.compagnies(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_compagnies PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE NOT NULL, lastupdatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, needcomment BOOLEAN DEFAULT FALSE, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255));
-CREATE TABLE ll_landing.conservation(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate DATE, lastupdatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, needcomment BOOLEAN DEFAULT FALSE, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), CONSTRAINT pk_ll_landing_conservation primary key(topiaid));
-CREATE TABLE ll_landing.datasource(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate DATE, lastupdatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, needcomment BOOLEAN DEFAULT FALSE, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), CONSTRAINT pk_ll_landing_datasource primary key(topiaid));
-CREATE TABLE ll_landing.landingpart(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP, lastupdatedate TIMESTAMP NOT NULL, dataquality VARCHAR(255), categorymin NUMERIC, categorymax NUMERIC, count INTEGER, weight NUMERIC, startdate DATE, enddate DATE, species VARCHAR(255), fpazone VARCHAR(255), onboardprocessing VARCHAR(255), conservation VARCHAR(255), landing VARCHAR(255), weightmeasuremethod VARCHAR(255), CONSTRAINT pk_ll_landing_landingpart primary key(topiaid));
-CREATE TABLE ll_landing.landing(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP, lastupdatedate TIMESTAMP NOT NULL, comment VARCHAR(1025), startdate DATE, enddate DATE, datasource VARCHAR(255), compagnies VARCHAR(255), person VARCHAR(255), harbour VARCHAR(255), vessel VARCHAR(255), trip VARCHAR(255), CONSTRAINT pk_ll_landing_landing primary key(topiaid));
+CREATE TABLE ll_landing.conservation(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, lastupdatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, needcomment BOOLEAN DEFAULT FALSE, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), CONSTRAINT pk_ll_landing_conservation primary key(topiaid));
+CREATE TABLE ll_landing.datasource(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, lastupdatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, needcomment BOOLEAN DEFAULT FALSE, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), CONSTRAINT pk_ll_landing_datasource primary key(topiaid));
+CREATE TABLE ll_landing.landingpart(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, lastupdatedate TIMESTAMP NOT NULL, dataquality VARCHAR(255), categorymin NUMERIC, categorymax NUMERIC, count INTEGER, weight NUMERIC, startdate DATE, enddate DATE, species VARCHAR(255), fpazone VARCHAR(255), onboardprocessing VARCHAR(255), conservation VARCHAR(255), landing VARCHAR(255), weightmeasuremethod VARCHAR(255), CONSTRAINT pk_ll_landing_landingpart primary key(topiaid));
+CREATE TABLE ll_landing.landing(topiaid VARCHAR(255) NOT NULL, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, lastupdatedate TIMESTAMP NOT NULL, comment VARCHAR(1025), startdate DATE, enddate DATE, datasource VARCHAR(255), compagnies VARCHAR(255), person VARCHAR(255), harbour VARCHAR(255), vessel VARCHAR(255), trip VARCHAR(255), CONSTRAINT pk_ll_landing_landing primary key(topiaid));
INSERT INTO ll_landing.compagnies(topiaid, topiaversion, topiacreatedate, lastupdatedate, code, status, needcomment, uri, label1, label2, label3, label4, label5, label6, label7, label8) SELECT topiaid, topiaversion, topiacreatedate, lastupdatedate, code, status, needcomment, uri, label1, label2, label3, label4, label5, label6, label7, label8 FROM observe_common.compagnies;
INSERT INTO ll_landing.conservation(topiaid, topiaversion, topiacreatedate, lastupdatedate, code, status, needcomment, uri, label1, label2, label3, label4, label5, label6, label7, label8 ) SELECT topiaid, topiaversion, topiacreatedate, lastupdatedate, code, status, needcomment, uri, label1, label2, label3, label4, label5, label6, label7, label8 FROM observe_longline.conservation;
=====================================
persistence/src/main/resources/db/migration/8.0/201_ps_common_add_referential_tables-common.sql
=====================================
@@ -20,8 +20,8 @@
-- #L%
---
-CREATE TABLE ps_common.SchoolType(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_common_SchoolType PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP, code VARCHAR(255), uri VARCHAR(255), status INTEGER DEFAULT 1, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, homeId VARCHAR(255));
-CREATE TABLE ps_common.TransmittingBuoyOwnership(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_common_TransmittingBuoyOwnership PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP, code VARCHAR(255), uri VARCHAR(255), status INTEGER DEFAULT 1, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, homeId VARCHAR(255));
+CREATE TABLE ps_common.SchoolType(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_common_SchoolType PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), uri VARCHAR(255), status INTEGER DEFAULT 1, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, homeId VARCHAR(255));
+CREATE TABLE ps_common.TransmittingBuoyOwnership(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_common_TransmittingBuoyOwnership PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), uri VARCHAR(255), status INTEGER DEFAULT 1, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, homeId VARCHAR(255));
INSERT INTO ps_common.SchoolType(topiaid, topiaversion, topiacreatedate, code, uri, status, label1, label2, label3, needcomment, lastupdatedate) values ('fr.ird.referential.ps.common.SchoolType#0#0' , 0, CURRENT_DATE, '0', null ,1, 'Undefined school type', 'Banc indéterminé', 'Banco indeterminado', false, CURRENT_TIMESTAMP);
INSERT INTO ps_common.SchoolType(topiaid, topiaversion, topiacreatedate, code, uri, status, label1, label2, label3, needcomment, lastupdatedate) values ('fr.ird.referential.ps.common.SchoolType#0#1' , 0, CURRENT_DATE, '1', null ,1, 'Object school type', 'Banc objet', 'Banco a objeto', false, CURRENT_TIMESTAMP);
=====================================
persistence/src/main/resources/db/migration/8.0/203_ps_observation_move_common_referential_tables-H2.sql
=====================================
@@ -20,8 +20,8 @@
-- #L%
---
-CREATE TABLE ps_common.ObjectMaterialType(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_common_object_material_type PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE, lastupdatedate TIMESTAMP NOT NULL, code VARCHAR(255) NOT NULL, homeId VARCHAR(255), status INTEGER DEFAULT 1, needcomment BOOLEAN DEFAULT FALSE, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255));
-CREATE TABLE ps_common.ObjectOperation(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_common_objectoperation PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP, code VARCHAR(255), homeId VARCHAR(255), uri VARCHAR(255), status INTEGER DEFAULT 1, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, whenarriving BOOLEAN DEFAULT TRUE, whenleaving BOOLEAN DEFAULT TRUE);
+CREATE TABLE ps_common.ObjectMaterialType(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_common_object_material_type PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, lastupdatedate TIMESTAMP NOT NULL, code VARCHAR(255) NOT NULL, homeId VARCHAR(255), status INTEGER DEFAULT 1, needcomment BOOLEAN DEFAULT FALSE, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255));
+CREATE TABLE ps_common.ObjectOperation(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_common_objectoperation PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), homeId VARCHAR(255), uri VARCHAR(255), status INTEGER DEFAULT 1, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, whenarriving BOOLEAN DEFAULT TRUE, whenleaving BOOLEAN DEFAULT TRUE);
INSERT INTO ps_common.objectmaterialtype(topiaid, topiaversion, topiacreatedate, lastupdatedate, code, status, needcomment, uri, label1, label2, label3, label4, label5, label6, label7, label8) SELECT REPLACE(topiaid, 'ps.observation', 'ps.common'), topiaversion + 1, topiacreatedate, lastupdatedate, code, status, needcomment, uri, label1, label2, label3, label4, label5, label6, label7, label8 FROM ps_observation.objectmaterialtype;
INSERT INTO ps_common.objectoperation(topiaid, topiaversion, topiacreatedate, code, uri, status, label1, label2, label3, label4, label5, label6, label7, label8, needcomment, lastupdatedate, whenarriving, whenleaving) SELECT REPLACE(topiaid, 'ps.observation', 'ps.common'), topiaversion + 1, topiacreatedate, code, uri, status, label1, label2, label3, label4, label5, label6, label7, label8, needcomment, lastupdatedate, whenarriving, whenleaving FROM ps_observation.objectoperation;
=====================================
persistence/src/main/resources/db/migration/8.0/203_ps_observation_move_common_referential_tables-PG.sql
=====================================
@@ -20,8 +20,8 @@
-- #L%
---
-CREATE TABLE ps_common.ObjectMaterialType(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_common_object_material_type PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE, lastupdatedate TIMESTAMP NOT NULL, code VARCHAR(255) NOT NULL, homeId VARCHAR(255), status INTEGER DEFAULT 1, needcomment BOOLEAN DEFAULT FALSE, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255));
-CREATE TABLE ps_common.ObjectOperation(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_common_objectoperation PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP, code VARCHAR(255), homeId VARCHAR(255), uri VARCHAR(255), status INTEGER DEFAULT 1, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, whenarriving BOOLEAN DEFAULT TRUE, whenleaving BOOLEAN DEFAULT TRUE);
+CREATE TABLE ps_common.ObjectMaterialType(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_common_object_material_type PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, lastupdatedate TIMESTAMP NOT NULL, code VARCHAR(255) NOT NULL, homeId VARCHAR(255), status INTEGER DEFAULT 1, needcomment BOOLEAN DEFAULT FALSE, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255));
+CREATE TABLE ps_common.ObjectOperation(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ps_common_objectoperation PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate TIMESTAMP NOT NULL, code VARCHAR(255), homeId VARCHAR(255), uri VARCHAR(255), status INTEGER DEFAULT 1, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, whenarriving BOOLEAN DEFAULT TRUE, whenleaving BOOLEAN DEFAULT TRUE);
INSERT INTO ps_common.objectmaterialtype(topiaid, topiaversion, topiacreatedate, lastupdatedate, code, status, needcomment, uri, label1, label2, label3, label4, label5, label6, label7, label8) SELECT REPLACE(topiaid, 'ps.observation', 'ps.common'), topiaversion + 1, topiacreatedate, lastupdatedate, code, status, needcomment, uri, label1, label2, label3, label4, label5, label6, label7, label8 FROM ps_observation.objectmaterialtype;
INSERT INTO ps_common.objectoperation(topiaid, topiaversion, topiacreatedate, code, uri, status, label1, label2, label3, label4, label5, label6, label7, label8, needcomment, lastupdatedate, whenarriving, whenleaving) SELECT REPLACE(topiaid, 'ps.observation', 'ps.common'), topiaversion + 1, topiacreatedate, code, uri, status, label1, label2, label3, label4, label5, label6, label7, label8, needcomment, lastupdatedate, whenarriving, whenleaving FROM ps_observation.objectoperation;
=====================================
pom.xml
=====================================
@@ -161,7 +161,7 @@
<!--can't use 1.4.197 (date has changed + blob also)-->
<lib.version.h2>1.4.196</lib.version.h2>
- <lib.version.java4all.topia>1.11</lib.version.java4all.topia>
+ <lib.version.java4all.topia>1.12</lib.version.java4all.topia>
<!--<lib.version.java4all.eugene>3.0-alpha-22</lib.version.java4all.eugene>-->
<!--lib.version.java4all.jaxx>3.0-alpha-52</lib.version.java4all.jaxx-->
<!--<lib.version.java4all.i18n>4.0-beta-3-SNAPSHOT</lib.version.java4all.i18n>-->
=====================================
test/src/main/resources/db/8.0/dataForTestLongline.sql.gz
=====================================
Binary files a/test/src/main/resources/db/8.0/dataForTestLongline.sql.gz and b/test/src/main/resources/db/8.0/dataForTestLongline.sql.gz differ
=====================================
test/src/main/resources/db/8.0/dataForTestSeine.sql.gz
=====================================
Binary files a/test/src/main/resources/db/8.0/dataForTestSeine.sql.gz and b/test/src/main/resources/db/8.0/dataForTestSeine.sql.gz differ
=====================================
test/src/main/resources/db/8.0/empty_h2.sql.gz
=====================================
Binary files a/test/src/main/resources/db/8.0/empty_h2.sql.gz and b/test/src/main/resources/db/8.0/empty_h2.sql.gz differ
=====================================
test/src/main/resources/db/8.0/empty_pg.sql.gz
=====================================
Binary files a/test/src/main/resources/db/8.0/empty_pg.sql.gz and b/test/src/main/resources/db/8.0/empty_pg.sql.gz differ
=====================================
test/src/main/resources/db/8.0/referentiel.sql.gz
=====================================
Binary files a/test/src/main/resources/db/8.0/referentiel.sql.gz and b/test/src/main/resources/db/8.0/referentiel.sql.gz differ
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/9490d17a74a3e61534dcd216313…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/9490d17a74a3e61534dcd216313…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop] Problème synchro avancée référentiel - Closes #1352
by Tony CHEMIT 16 Jul '19
by Tony CHEMIT 16 Jul '19
16 Jul '19
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
11392cc4 by tchemit at 2019-07-16T18:26:15Z
Problème synchro avancée référentiel - Closes #1352
- - - - -
2 changed files:
- services-local/src/main/java/fr/ird/observe/services/local/service/actions/synchro/referential/ng/ReferentialSynchronizeSqlsRequestBuilder.java
- services/src/main/java/fr/ird/observe/services/service/actions/synchro/referential/ng/ReferentialSynchronizeRequest.java
Changes:
=====================================
services-local/src/main/java/fr/ird/observe/services/local/service/actions/synchro/referential/ng/ReferentialSynchronizeSqlsRequestBuilder.java
=====================================
@@ -22,8 +22,10 @@ package fr.ird.observe.services.local.service.actions.synchro.referential.ng;
* #L%
*/
+import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Multimap;
import fr.ird.observe.binder.referential.ReferentialEntityDtoBinderSupport;
import fr.ird.observe.dto.reference.ReferentialDtoReference;
import fr.ird.observe.dto.referential.ReferentialDto;
@@ -90,14 +92,17 @@ public class ReferentialSynchronizeSqlsRequestBuilder {
ImmutableSet<Class<? extends ReferentialDtoReference>> types = request.getTypes();
+
+ Multimap<Class<? extends ReferentialDtoReference>, String> newIds = request.getNewIds();
+
for (Class<? extends ReferentialDto> dtoType : DtoModelClasses.REFERENTIAL_TYPES) {
- build0(dtoType, types);
+ build0(dtoType, types, newIds);
}
return resultBuilder.build();
}
- private <D extends ReferentialDto, R extends ReferentialDtoReference<D, R>, E extends ObserveReferentialEntity> void build0(Class<D> dtoType, ImmutableSet<Class<? extends ReferentialDtoReference>> types) {
+ private <D extends ReferentialDto, R extends ReferentialDtoReference<D, R>, E extends ObserveReferentialEntity> void build0(Class<D> dtoType, ImmutableSet<Class<? extends ReferentialDtoReference>> types, Multimap<Class<? extends ReferentialDtoReference>, String> newIds) {
ReferentialDtoEntityContext<D, R, E> modelContext = DbModelHelper.fromReferentialDto(dtoType);
Class<R> referenceType = modelContext.toReferenceType();
@@ -117,13 +122,13 @@ public class ReferentialSynchronizeSqlsRequestBuilder {
if (log.isInfoEnabled()) {
log.info("Add: " + addTasks.size());
}
- onAdd(referentialName, referenceType, addTasks, binder);
+ onAdd(referentialName, referenceType, addTasks, binder, newIds);
Set<ReferentialSynchronizeTask<R>> updateTasks = request.getUpdateTasks(referenceType);
if (log.isInfoEnabled()) {
log.info("Update: " + updateTasks.size());
}
- onUpdate(referentialName, referenceType, updateTasks, binder);
+ onUpdate(referentialName, referenceType, updateTasks, binder, newIds);
Set<ReferentialSynchronizeTask<R>> revertTasks = request.getRevertTasks(referenceType);
if (log.isInfoEnabled()) {
@@ -145,7 +150,7 @@ public class ReferentialSynchronizeSqlsRequestBuilder {
}
- private <D extends ReferentialDto, R extends ReferentialDtoReference<D, R>, E extends ObserveReferentialEntity> void onAdd(String referentialName, Class<R> referenceType, Set<ReferentialSynchronizeTask<R>> tasks, ReferentialEntityDtoBinderSupport<D, E> binder) {
+ private <D extends ReferentialDto, R extends ReferentialDtoReference<D, R>, E extends ObserveReferentialEntity> void onAdd(String referentialName, Class<R> referenceType, Set<ReferentialSynchronizeTask<R>> tasks, ReferentialEntityDtoBinderSupport<D, E> binder, Multimap<Class<? extends ReferentialDtoReference>, String> newIds) {
Class<E> entityType = binder.getEntityType();
Class<D> dtoType = binder.getDtoType();
@@ -153,7 +158,9 @@ public class ReferentialSynchronizeSqlsRequestBuilder {
List<E> insertEntities = loadEntities(entityType, tasks);
if (metadata.withEntities()) {
- InsertSqlWithCascadeStatementGenerator<D> insertGenerator = new InsertSqlWithCascadeStatementGenerator<D>(metadataModel, metadata, dtoType, request.getIdsOnlyExistingOnThisSide()) {
+ Multimap<Class<? extends ReferentialDtoReference>, String> allIds = ArrayListMultimap.create(request.getIdsOnlyExistingOnThisSide());
+ allIds.putAll(newIds);
+ InsertSqlWithCascadeStatementGenerator<D> insertGenerator = new InsertSqlWithCascadeStatementGenerator<D>(metadataModel, metadata, dtoType, allIds) {
@Override
protected <DD extends ReferentialDto> ImmutableList<String> insertMissingReferential(Class<DD> referentialType, String id) {
@@ -188,7 +195,7 @@ public class ReferentialSynchronizeSqlsRequestBuilder {
}
- private <D extends ReferentialDto, R extends ReferentialDtoReference<D, R>, E extends ObserveReferentialEntity> void onUpdate(String referentialName, Class<R> referenceType, Set<ReferentialSynchronizeTask<R>> tasks, ReferentialEntityDtoBinderSupport<D, E> binder) {
+ private <D extends ReferentialDto, R extends ReferentialDtoReference<D, R>, E extends ObserveReferentialEntity> void onUpdate(String referentialName, Class<R> referenceType, Set<ReferentialSynchronizeTask<R>> tasks, ReferentialEntityDtoBinderSupport<D, E> binder, Multimap<Class<? extends ReferentialDtoReference>, String> newIds) {
Class<D> dtoType = binder.getDtoType();
TopiaMetadataEntity metadata = metadataModel.getEntity(referentialName);
@@ -197,6 +204,10 @@ public class ReferentialSynchronizeSqlsRequestBuilder {
if (metadata.withEntities()) {
+
+ Multimap<Class<? extends ReferentialDtoReference>, String> allIds = ArrayListMultimap.create(request.getIdsOnlyExistingOnThisSide());
+ allIds.putAll(newIds);
+
UpdateSqlWithCascadeStatementGenerator<D> updateGenerator = new UpdateSqlWithCascadeStatementGenerator<D>(metadataModel, metadata, dtoType, request.getIdsOnlyExistingOnThisSide()) {
@Override
=====================================
services/src/main/java/fr/ird/observe/services/service/actions/synchro/referential/ng/ReferentialSynchronizeRequest.java
=====================================
@@ -71,6 +71,14 @@ public class ReferentialSynchronizeRequest implements ObserveDto {
return idsOnlyExistingOnThisSide;
}
+ public Multimap<Class<? extends ReferentialDtoReference>, String> getNewIds() {
+ Multimap<Class<? extends ReferentialDtoReference>, String> result = ArrayListMultimap.create();
+ for (ReferentialSynchronizeTask<?> task : tasks.get(ReferentialSynchronizeTaskType.ADD)) {
+ result.put(task.getReferentialType(), task.getReferentialId());
+ }
+ return result;
+ }
+
public ImmutableMultimap<ReferentialSynchronizeTaskType, ReferentialSynchronizeTask<?>> getTasks() {
return tasks;
}
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/11392cc4e11628577527b4fe6b9…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/11392cc4e11628577527b4fe6b9…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop] 2 commits: Renommer champs vessel.iattcid et vessel.ctoiid - Closes #1349
by Tony CHEMIT 16 Jul '19
by Tony CHEMIT 16 Jul '19
16 Jul '19
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
b4f6d4f9 by tchemit at 2019-07-16T17:13:11Z
Renommer champs vessel.iattcid et vessel.ctoiid - Closes #1349
- - - - -
1d53b191 by tchemit at 2019-07-16T17:13:12Z
[REF] Consolidation du réferentiel common.LengthWeightParameter - Closes #1350
[REF] Consolidation du réferentiel common.LengthLengthParameter - Closes #1351
- - - - -
19 changed files:
- client-core/src/main/i18n/getters/jaxx.getter
- client-core/src/main/java/fr/ird/observe/client/ui/content/ref/common/VesselUI.jaxx
- client-core/src/main/java/fr/ird/observe/client/ui/content/ref/common/VesselUIModel.java
- dto/src/main/models/Observe-01-referential-common.model
- observe-i18n/src/main/i18n/translations/observe_en_GB.properties
- observe-i18n/src/main/i18n/translations/observe_es_ES.properties
- observe-i18n/src/main/i18n/translations/observe_fr_FR.properties
- persistence/src/main/java/fr/ird/observe/binder/referential/common/VesselEntityDtoBinder.java
- persistence/src/main/models/Observe-01-referential-common.model
- persistence/src/main/resources/db/migration/8.0/101_create_common_schema-common.sql
- services-local/src/main/java/fr/ird/observe/services/local/service/actions/consolidate/ConsolidateDataServiceLocal.java
- services-local/src/test/java/fr/ird/observe/services/local/entity/LengthWeightParemetersTest.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/empty_h2.sql.gz
- test/src/main/resources/db/8.0/empty_pg.sql.gz
- test/src/main/resources/db/8.0/referentiel.sql.gz
- test/src/main/resources/fixtures/count-referential-common.properties
- test/src/main/resources/fixtures/validate-service-referential.properties
Changes:
=====================================
client-core/src/main/i18n/getters/jaxx.getter
=====================================
@@ -876,11 +876,11 @@ observe.common.VesselActivitySeineDto.allowFad
observe.common.VesselDto.capacity
observe.common.VesselDto.changeDate
observe.common.VesselDto.comId
-observe.common.VesselDto.ctoiId
observe.common.VesselDto.flagCountry
observe.common.VesselDto.generalTab
-observe.common.VesselDto.iattcId
+observe.common.VesselDto.iccat
observe.common.VesselDto.imoId
+observe.common.VesselDto.iotcId
observe.common.VesselDto.keelCodeFlotte
observe.common.VesselDto.length
observe.common.VesselDto.lloydId
=====================================
client-core/src/main/java/fr/ird/observe/client/ui/content/ref/common/VesselUI.jaxx
=====================================
@@ -220,13 +220,13 @@ fr.ird.observe.client.ui.util.BeanCheckBox
</cell>
</row>
- <!-- ctoiId -->
+ <!-- iotcId -->
<row>
<cell anchor="west">
- <JLabel id='ctoiIdLabel'/>
+ <JLabel id='iotcIdLabel'/>
</cell>
<cell anchor='east' weightx="1" fill="both">
- <NormalTextEditor id='ctoiId'/>
+ <NormalTextEditor id='iotcId'/>
</cell>
</row>
@@ -240,13 +240,13 @@ fr.ird.observe.client.ui.util.BeanCheckBox
</cell>
</row>
- <!-- iattcId -->
+ <!-- iccat -->
<row>
<cell anchor="west">
- <JLabel id='iattcIdLabel'/>
+ <JLabel id='iccatLabel'/>
</cell>
<cell anchor='east' weightx="1" fill="both">
- <NormalTextEditor id='iattcId'/>
+ <NormalTextEditor id='iccat'/>
</cell>
</row>
=====================================
client-core/src/main/java/fr/ird/observe/client/ui/content/ref/common/VesselUIModel.java
=====================================
@@ -52,8 +52,8 @@ public class VesselUIModel extends ContentReferenceUIModel<VesselDto, VesselRefe
VesselDto.PROPERTY_SEARCH_MAXIMUM,
VesselDto.PROPERTY_CHANGE_DATE,
VesselDto.PROPERTY_COM_ID,
- VesselDto.PROPERTY_CTOI_ID,
- VesselDto.PROPERTY_IATTC_ID,
+ VesselDto.PROPERTY_IOTC_ID,
+ VesselDto.PROPERTY_ICCAT,
VesselDto.PROPERTY_IMO_ID,
VesselDto.PROPERTY_NATIONAL_ID,
VesselDto.PROPERTY_RADIO_CALL_SIGN_ID,
=====================================
dto/src/main/models/Observe-01-referential-common.model
=====================================
@@ -148,8 +148,8 @@ capacity + {*:1} Float
power + {*:1} Integer
searchMaximum + {*:1} Float
comment + {*:1} String
-iattcId + {*:1} String
-ctoiId + {*:1} String
+iccat + {*:1} String
+iotcId + {*:1} String
nationalId + {*:1} String
comId + {*:1} String
tuviId + {*:1} String
=====================================
observe-i18n/src/main/i18n/translations/observe_en_GB.properties
=====================================
@@ -2500,12 +2500,12 @@ observe.common.VesselActivitySeineDto.types=Vessel activities (Seine)
observe.common.VesselDto.capacity=Capacity
observe.common.VesselDto.changeDate=Change date
observe.common.VesselDto.comId=EU Id
-observe.common.VesselDto.ctoiId=IOTC id
observe.common.VesselDto.flagCountry=Flag country
observe.common.VesselDto.fleetCountry=Fleet country
observe.common.VesselDto.generalTab=General caracteristics
-observe.common.VesselDto.iattcId=ICCAT Id
+observe.common.VesselDto.iccat=ICCAT Id
observe.common.VesselDto.imoId=IMO Id
+observe.common.VesselDto.iotcId=IOTC id
observe.common.VesselDto.keelCode=Keel code
observe.common.VesselDto.keelCodeFlotte=Keel / Flotte
observe.common.VesselDto.length=Length
=====================================
observe-i18n/src/main/i18n/translations/observe_es_ES.properties
=====================================
@@ -2500,12 +2500,12 @@ observe.common.VesselActivitySeineDto.types=Actividades buque \#TODO-SP
observe.common.VesselDto.capacity=Capacidad de transporte
observe.common.VesselDto.changeDate=Fecha de carga
observe.common.VesselDto.comId=Id EU
-observe.common.VesselDto.ctoiId=Id IOTC
observe.common.VesselDto.flagCountry=Bandera
observe.common.VesselDto.fleetCountry=País
observe.common.VesselDto.generalTab=Características generales
-observe.common.VesselDto.iattcId=Id CICAA
+observe.common.VesselDto.iccat=Id CICAA
observe.common.VesselDto.imoId=Id IMO
+observe.common.VesselDto.iotcId=Id IOTC
observe.common.VesselDto.keelCode=Código de Quilla
observe.common.VesselDto.keelCodeFlotte=Código de Quilla / Flota
observe.common.VesselDto.length=Longitud eslora total
=====================================
observe-i18n/src/main/i18n/translations/observe_fr_FR.properties
=====================================
@@ -2500,12 +2500,12 @@ observe.common.VesselActivitySeineDto.types=Activités bateau (Senne)
observe.common.VesselDto.capacity=Capacité transport (m³)
observe.common.VesselDto.changeDate=Date changement pavillon
observe.common.VesselDto.comId=Id EU
-observe.common.VesselDto.ctoiId=Id CTOI
observe.common.VesselDto.flagCountry=Pavillon
observe.common.VesselDto.fleetCountry=Flotte
observe.common.VesselDto.generalTab=Caractéristiques générales
-observe.common.VesselDto.iattcId=Id CICTA
+observe.common.VesselDto.iccat=Id CICTA
observe.common.VesselDto.imoId=Id IMO
+observe.common.VesselDto.iotcId=Id CTOI
observe.common.VesselDto.keelCode=Code quille
observe.common.VesselDto.keelCodeFlotte=Code quille /Code flotte
observe.common.VesselDto.length=Longueur hors tout
=====================================
persistence/src/main/java/fr/ird/observe/binder/referential/common/VesselEntityDtoBinder.java
=====================================
@@ -56,8 +56,8 @@ public class VesselEntityDtoBinder extends ReferentialEntityDtoBinderSupport<Ves
entity.setSearchMaximum(dto.getSearchMaximum());
entity.setComment(dto.getComment());
entity.setComId(dto.getComId());
- entity.setCtoiId(dto.getCtoiId());
- entity.setIattcId(dto.getIattcId());
+ entity.setIotcId(dto.getIotcId());
+ entity.setIccat(dto.getIccat());
entity.setImoId(dto.getImoId());
entity.setNationalId(dto.getNationalId());
entity.setRadioCallSignId(dto.getRadioCallSignId());
@@ -83,8 +83,8 @@ public class VesselEntityDtoBinder extends ReferentialEntityDtoBinderSupport<Ves
dto.setSearchMaximum(entity.getSearchMaximum());
dto.setComment(entity.getComment());
dto.setComId(entity.getComId());
- dto.setCtoiId(entity.getCtoiId());
- dto.setIattcId(entity.getIattcId());
+ dto.setIotcId(entity.getIotcId());
+ dto.setIccat(entity.getIccat());
dto.setImoId(entity.getImoId());
dto.setNationalId(entity.getNationalId());
dto.setRadioCallSignId(entity.getRadioCallSignId());
=====================================
persistence/src/main/models/Observe-01-referential-common.model
=====================================
@@ -38,7 +38,7 @@ species {*:1} referential.common.Species | notNull lazy=false
sex {*:1} referential.common.Sex | notNull lazy=false
startDate + {*:1} Date
endDate + {*:1} Date
-coefficients + {*:1} String
+coefficients + {*:1} String | notNull
source + {*:1} String | hibernateAttributeType=text
computeFromFormulaOne(data float) Float
computeFromFormulaTwo(data float) Float
@@ -65,19 +65,19 @@ getQuadrant() Integer
setQuadrant(quadrant Integer)
referential.common.LengthLengthParameter > referential.common.FormulaSupport | entity
-inputOutputFormula + {*:1} String
-outputInputFormula + {*:1} String
-inputSizeMeasureType {*:1} referential.common.SizeMeasureType | lazy=false
-outputSizeMeasureType {*:1} referential.common.SizeMeasureType | lazy=false
+inputOutputFormula + {*:1} String | notNull
+outputInputFormula + {*:1} String | notNull
+inputSizeMeasureType {*:1} referential.common.SizeMeasureType | lazy=false notNull
+outputSizeMeasureType {*:1} referential.common.SizeMeasureType | lazy=false notNull
abstract referential.common.LengthWeightAble
referential.common.LengthWeightParameter > referential.common.FormulaSupport | entity
-lengthWeightFormula + {*:1} String
-weightLengthFormula + {*:1} String
+lengthWeightFormula + {*:1} String | notNull
+weightLengthFormula + {*:1} String | notNull
meanLength + {*:1} Float
meanWeight + {*:1} Float
-sizeMeasureType {*:0..1} referential.common.SizeMeasureType | lazy=false
+sizeMeasureType {*:0..1} referential.common.SizeMeasureType | lazy=false notNull
referential.common.LengthMeasureMethod > referential.I18nReferentialEntity | entity
@@ -163,8 +163,8 @@ capacity + {*:1} Float | sqlType=numeric
power + {*:1} Integer
searchMaximum + {*:1} Float | sqlType=numeric
comment + {*:1} String | hibernateAttributeType=text
-iattcId + {*:1} String
-ctoiId + {*:1} String
+iccat + {*:1} String
+iotcId + {*:1} String
nationalId + {*:1} String
comId + {*:1} String
tuviId + {*:1} String
=====================================
persistence/src/main/resources/db/migration/8.0/101_create_common_schema-common.sql
=====================================
@@ -40,13 +40,13 @@ CREATE TABLE common.shipowner(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_ship_o
CREATE TABLE common.sizemeasuretype(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_sizemeasuretype PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE NOT NULL, lastupdatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, needcomment BOOLEAN DEFAULT FALSE, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255));
CREATE TABLE common.speciesgroup(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_speciesgroup PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE NOT NULL, code VARCHAR(255), uri VARCHAR(255), status INTEGER DEFAULT 1, needcomment BOOLEAN, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
CREATE TABLE common.species(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_species PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE NOT NULL, code VARCHAR(255), homeid VARCHAR(255), wormsid BIGINT, uri VARCHAR(255), status INTEGER DEFAULT 1, faocode VARCHAR(255), needcomment BOOLEAN, scientificlabel VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), minlength NUMERIC, maxlength NUMERIC, minweight NUMERIC, maxweight NUMERIC, speciesgroup VARCHAR(255), lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, sizemeasuretype VARCHAR(255));
-CREATE TABLE common.lengthlengthparameter(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_lengthlengthparameter PRIMARY KEY, topiaversion BIGINT NOT NULL, inputsizemeasuretype VARCHAR(255) NOT NULL, outputsizemeasuretype VARCHAR(255) NOT NULL, topiacreatedate DATE NOT NULL, uri VARCHAR(255), status INTEGER DEFAULT 1, coefficients VARCHAR(255), inputoutputformula VARCHAR(255), outputinputformula VARCHAR(255), code VARCHAR(255) DEFAULT 0, needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, source VARCHAR(1025), species VARCHAR(255), ocean VARCHAR(255), sex VARCHAR(255), startdate DATE, enddate DATE);
-CREATE TABLE common.lengthweightparameter(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_lengthweightparameter PRIMARY KEY, topiaversion BIGINT NOT NULL, ocean VARCHAR(255), species VARCHAR(255) NOT NULL, topiacreatedate DATE NOT NULL, uri VARCHAR(255), status INTEGER DEFAULT 1, startdate TIMESTAMP, enddate TIMESTAMP, coefficients VARCHAR(255), lengthweightformula VARCHAR(255), weightlengthformula VARCHAR(255), meanlength NUMERIC, meanweight NUMERIC, sex VARCHAR(255), code VARCHAR(255) DEFAULT 0, needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, source VARCHAR(1025), sizemeasuretype VARCHAR(255));
+CREATE TABLE common.lengthlengthparameter(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_lengthlengthparameter PRIMARY KEY, topiaversion BIGINT NOT NULL, inputsizemeasuretype VARCHAR(255) NOT NULL, outputsizemeasuretype VARCHAR(255) NOT NULL, topiacreatedate DATE NOT NULL, uri VARCHAR(255), status INTEGER DEFAULT 1, coefficients VARCHAR(255) NOT NULL, inputoutputformula VARCHAR(255) NOT NULL, outputinputformula VARCHAR(255) NOT NULL, code VARCHAR(255) DEFAULT 0, needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, source VARCHAR(1025), species VARCHAR(255) NOT NULL, ocean VARCHAR(255) NOT NULL, sex VARCHAR(255) NOT NULL, startdate DATE, enddate DATE);
+CREATE TABLE common.lengthweightparameter(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_lengthweightparameter PRIMARY KEY, topiaversion BIGINT NOT NULL, ocean VARCHAR(255) NOT NULL, species VARCHAR(255) NOT NULL, topiacreatedate DATE NOT NULL, uri VARCHAR(255), status INTEGER DEFAULT 1, startdate TIMESTAMP, enddate TIMESTAMP, coefficients VARCHAR(255) NOT NULL, lengthweightformula VARCHAR(255) NOT NULL, weightlengthformula VARCHAR(255) NOT NULL, meanlength NUMERIC, meanweight NUMERIC, sex VARCHAR(255) NOT NULL, code VARCHAR(255) DEFAULT 0, needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, source VARCHAR(1025), sizemeasuretype VARCHAR(255) NOT NULL);
CREATE TABLE common.speciesgroupreleasemode(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_species_group_release_mode PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE NOT NULL, lastupdatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, needcomment BOOLEAN DEFAULT FALSE, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255));
CREATE TABLE common.specieslist(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_specieslist PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
CREATE TABLE common.vesselsizecategory(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_vesselsizecategory PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE NOT NULL, code VARCHAR(255), uri VARCHAR(255), status INTEGER DEFAULT 1, capacitylabel VARCHAR(255), gaugelabel VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
CREATE TABLE common.vesseltype(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_vesseltype PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE NOT NULL, code VARCHAR(255), uri VARCHAR(255), status INTEGER DEFAULT 1, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
-CREATE TABLE common.vessel(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_vessel PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE NOT NULL, code VARCHAR(255), keelcode INTEGER, fleetcountry INTEGER, changedate TIMESTAMP, yearservice INTEGER, length NUMERIC, capacity NUMERIC, power INTEGER, searchmaximum NUMERIC, uri VARCHAR(255), status INTEGER DEFAULT 1, comment VARCHAR(1025), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), flagcountry VARCHAR(255), vesseltype VARCHAR(255), vesselsizecategory VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, comid VARCHAR(255), ctoiid VARCHAR(255), iattcid VARCHAR(255), imoid VARCHAR(255), nationalid VARCHAR(255), radiocallsignid VARCHAR(255), tuviid VARCHAR(255), shipowner VARCHAR(255));
+CREATE TABLE common.vessel(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_vessel PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE NOT NULL, code VARCHAR(255), keelcode INTEGER, fleetcountry INTEGER, changedate TIMESTAMP, yearservice INTEGER, length NUMERIC, capacity NUMERIC, power INTEGER, searchmaximum NUMERIC, uri VARCHAR(255), status INTEGER DEFAULT 1, comment VARCHAR(1025), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), flagcountry VARCHAR(255), vesseltype VARCHAR(255), vesselsizecategory VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, comid VARCHAR(255), iotcId VARCHAR(255), iccat VARCHAR(255), imoid VARCHAR(255), nationalid VARCHAR(255), radiocallsignid VARCHAR(255), tuviid VARCHAR(255), shipowner VARCHAR(255));
CREATE TABLE common.weightmeasuremethod(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_weightmeasuremethod PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE NOT NULL, lastupdatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, needcomment BOOLEAN DEFAULT FALSE, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255));
CREATE TABLE common.weightmeasuretype(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_weightmeasuretype PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE NOT NULL, lastupdatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, needcomment BOOLEAN DEFAULT FALSE, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255));
CREATE TABLE common.wind(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_wind PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE NOT NULL, code VARCHAR(255), speedrange VARCHAR(255), waveheight VARCHAR(255), uri VARCHAR(255), status INTEGER DEFAULT 1, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
@@ -55,6 +55,14 @@ CREATE TABLE common.ocean_species(species VARCHAR(255) NOT NULL, ocean VARCHAR(2
CREATE TABLE common.speciesgroup_speciesgroupreleasemode(speciesgroup VARCHAR(255) NOT NULL, speciesgroupreleasemode VARCHAR(255) NOT NULL);
CREATE TABLE common.species_specieslist(specieslist VARCHAR(255) NOT NULL, species VARCHAR(255) NOT NULL);
+
+DELETE FROM observe_common.LengthWeightParameter WHERE topiaId = 'fr.ird.observe.entities.referentiel.LengthWeightParameter#201008191245#0.299';
+DELETE FROM observe_common.LengthWeightParameter WHERE topiaId = 'fr.ird.observe.entities.referentiel.LengthWeightParameter#201008191245#0.158';
+DELETE FROM observe_common.LengthWeightParameter WHERE topiaId = 'fr.ird.observe.entities.referentiel.LengthWeightParameter#201008191245#0.157';
+DELETE FROM observe_common.LengthWeightParameter WHERE topiaId = 'fr.ird.observe.entities.referentiel.LengthWeightParameter#201008191245#0.298';
+UPDATE observe_common.LengthWeightParameter SET sizeMeasureType = 'fr.ird.observe.entities.referentiel.SizeMeasureType#1433499465700#0.0902433863375336' WHERE sizeMeasureType IS NULL;
+UPDATE observe_common.LengthWeightParameter SET coefficients = 'a=0.5:b=0.0' WHERE coefficients IS NULL;
+
INSERT INTO common.country(topiaid, topiaversion, topiacreatedate, code, uri, iso2code, iso3code, status, label1, label2, label3, label4, label5, label6, label7, label8, needcomment, lastupdatedate) SELECT topiaid, topiaversion, topiacreatedate, code, uri, iso2code, iso3code, status, label1, label2, label3, label4, label5, label6, label7, label8, needcomment, lastupdatedate FROM observe_common.country;
INSERT INTO common.dataquality(topiaid, topiaversion, topiacreatedate, lastupdatedate, code, status, needcomment, uri, label1, label2, label3, label4, label5, label6, label7, label8) SELECT topiaid, topiaversion, topiacreatedate, lastupdatedate, code, status, needcomment, uri, label1, label2, label3, label4, label5, label6, label7, label8 FROM observe_common.dataquality;
INSERT INTO common.fpazone(topiaid, topiaversion, topiacreatedate, code, status, uri, label1, label2, label3, label4, label5, label6, label7, label8, startdate, enddate, needcomment, lastupdatedate) SELECT topiaid, topiaversion, topiacreatedate, code, status, uri, label1, label2, label3, label4, label5, label6, label7, label8, startdate, enddate, needcomment, lastupdatedate FROM observe_common.fpazone;
@@ -79,7 +87,7 @@ INSERT INTO common.speciesgroupreleasemode(topiaid, topiaversion, topiacreatedat
INSERT INTO common.specieslist(topiaid, topiaversion, topiacreatedate, code, status, uri, label1, label2, label3, label4, label5, label6, label7, label8, needcomment, lastupdatedate) SELECT topiaid, topiaversion, topiacreatedate, code, status, uri, label1, label2, label3, label4, label5, label6, label7, label8, needcomment, lastupdatedate FROM observe_common.specieslist;
INSERT INTO common.vesselsizecategory(topiaid, topiaversion, topiacreatedate, code, uri, status, capacitylabel, gaugelabel, needcomment, lastupdatedate) SELECT topiaid, topiaversion, topiacreatedate, code, uri, status, capacitylabel, gaugelabel, needcomment, lastupdatedate FROM observe_common.vesselsizecategory;
INSERT INTO common.vesseltype(topiaid, topiaversion, topiacreatedate, code, uri, status, label1, label2, label3, label4, label5, label6, label7, label8, needcomment, lastupdatedate) SELECT topiaid, topiaversion, topiacreatedate, code, uri, status, label1, label2, label3, label4, label5, label6, label7, label8, needcomment, lastupdatedate FROM observe_common.vesseltype;
-INSERT INTO common.vessel(topiaid, topiaversion, topiacreatedate, code, keelcode, fleetcountry, changedate, yearservice, length, capacity, power, searchmaximum, uri, status, comment, label1, label2, label3, label4, label5, label6, label7, label8, flagcountry, vesseltype, vesselsizecategory, needcomment, lastupdatedate, comid, ctoiid, iattcid, imoid, nationalid, radiocallsignid, tuviid, shipowner) SELECT topiaid, topiaversion, topiacreatedate, code, keelcode, fleetcountry, changedate, yearservice, length, capacity, power, searchmaximum, uri, status, comment, label1, label2, label3, label4, label5, label6, label7, label8, flagcountry, vesseltype, vesselsizecategory, needcomment, lastupdatedate, comid, ctoiid, iattcid, imoid, nationalid, radiocallsignid, tuviid, shipowner FROM observe_common.vessel;
+INSERT INTO common.vessel(topiaid, topiaversion, topiacreatedate, code, keelcode, fleetcountry, changedate, yearservice, length, capacity, power, searchmaximum, uri, status, comment, label1, label2, label3, label4, label5, label6, label7, label8, flagcountry, vesseltype, vesselsizecategory, needcomment, lastupdatedate, comid, iotcId, iccat, imoid, nationalid, radiocallsignid, tuviid, shipowner) SELECT topiaid, topiaversion, topiacreatedate, code, keelcode, fleetcountry, changedate, yearservice, length, capacity, power, searchmaximum, uri, status, comment, label1, label2, label3, label4, label5, label6, label7, label8, flagcountry, vesseltype, vesselsizecategory, needcomment, lastupdatedate, comid, ctoiid, iattcid, imoid, nationalid, radiocallsignid, tuviid, shipowner FROM observe_common.vessel;
INSERT INTO common.weightmeasuremethod(topiaid, topiaversion, topiacreatedate, lastupdatedate, code, status, needcomment, uri, label1, label2, label3, label4, label5, label6, label7, label8) SELECT topiaid, topiaversion, topiacreatedate, lastupdatedate, code, status, needcomment, uri, label1, label2, label3, label4, label5, label6, label7, label8 FROM observe_common.weightmeasuremethod;
INSERT INTO common.weightmeasuretype(topiaid, topiaversion, topiacreatedate, lastupdatedate, code, status, needcomment, uri, label1, label2, label3, label4, label5, label6, label7, label8) SELECT topiaid, topiaversion, topiacreatedate, lastupdatedate, code, status, needcomment, uri, label1, label2, label3, label4, label5, label6, label7, label8 FROM observe_common.weightmeasuretype;
INSERT INTO common.wind(topiaid, topiaversion, topiacreatedate, code, speedrange, waveheight, uri, status, label1, label2, label3, label4, label5, label6, label7, label8, needcomment, lastupdatedate) SELECT topiaid, topiaversion, topiacreatedate, code, speedrange, waveheight, uri, status, label1, label2, label3, label4, label5, label6, label7, label8, needcomment, lastupdatedate FROM observe_common.wind;
=====================================
services-local/src/main/java/fr/ird/observe/services/local/service/actions/consolidate/ConsolidateDataServiceLocal.java
=====================================
@@ -668,6 +668,12 @@ public class ConsolidateDataServiceLocal extends ObserveServiceLocal implements
log.error(String.format("No size measure type found for TargetLength (%s) will use the one of the species", lengthWeightComputable.getTopiaId()));
inputSizeMeasureType = species.getSizeMeasureType();
}
+
+ if (inputSizeMeasureType == null) {
+ log.error(String.format("No size measure type found for Species (%s), can't continue!", species.getTopiaId()));
+ return;
+ }
+
Optional<LengthWeightParameter> optionalLengthWeightParameter = activityContext.findLengthWeightParameter(species, sex, inputSizeMeasureType);
if (!optionalLengthWeightParameter.isPresent()) {
=====================================
services-local/src/test/java/fr/ird/observe/services/local/entity/LengthWeightParemetersTest.java
=====================================
@@ -8,12 +8,12 @@
* 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>.
@@ -23,22 +23,24 @@ package fr.ird.observe.services.local.entity;
import com.opensymphony.xwork2.interceptor.annotations.After;
import fr.ird.observe.dto.referential.ReferenceStatus;
-import fr.ird.observe.entities.referential.common.LengthWeightParameter;
+import fr.ird.observe.entities.ObserveTopiaDaoSupplier;
+import fr.ird.observe.entities.ObserveTopiaPersistenceContext;
import fr.ird.observe.entities.referential.LengthWeightParameterNotFoundException;
+import fr.ird.observe.entities.referential.common.LengthWeightParameter;
import fr.ird.observe.entities.referential.common.LengthWeightParameterTopiaDao;
import fr.ird.observe.entities.referential.common.LengthWeightParameters;
import fr.ird.observe.entities.referential.common.Ocean;
import fr.ird.observe.entities.referential.common.OceanTopiaDao;
import fr.ird.observe.entities.referential.common.Sex;
import fr.ird.observe.entities.referential.common.SexTopiaDao;
+import fr.ird.observe.entities.referential.common.SizeMeasureType;
+import fr.ird.observe.entities.referential.common.SizeMeasureTypeTopiaDao;
import fr.ird.observe.entities.referential.common.Species;
import fr.ird.observe.entities.referential.common.SpeciesTopiaDao;
-import fr.ird.observe.entities.ObserveTopiaDaoSupplier;
-import fr.ird.observe.entities.ObserveTopiaPersistenceContext;
import fr.ird.observe.services.local.service.ServiceLocalTestSupport;
import fr.ird.observe.test.spi.CopyDatabaseConfiguration;
-import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
@@ -64,6 +66,7 @@ public class LengthWeightParemetersTest extends ServiceLocalTestSupport {
Species species,
Ocean ocean,
Sex sex,
+ SizeMeasureType sizeMeasureType,
Date startDate,
Date endDate) {
@@ -72,6 +75,7 @@ public class LengthWeightParemetersTest extends ServiceLocalTestSupport {
entity.setSpecies(species);
entity.setSex(sex);
entity.setOcean(ocean);
+ entity.setSizeMeasureType(sizeMeasureType);
entity.setStartDate(startDate);
entity.setEndDate(endDate);
entity.setStatus(ReferenceStatus.enabled);
@@ -92,6 +96,7 @@ public class LengthWeightParemetersTest extends ServiceLocalTestSupport {
SpeciesTopiaDao speciesDAO = persistenceContext.getCommonSpeciesDao();
OceanTopiaDao oceanDAO = persistenceContext.getCommonOceanDao();
SexTopiaDao sexDao = persistenceContext.getCommonSexDao();
+ SizeMeasureTypeTopiaDao sizeMeasureTypeDao = persistenceContext.getCommonSizeMeasureTypeDao();
Optional<Species> optionalSpecies = Optional.ofNullable(speciesDAO.forFaoCodeEquals("ALB").tryFindUnique().orNull());
Assert.assertTrue("Could not find species with faoCode: DOL", optionalSpecies.isPresent());
@@ -105,6 +110,10 @@ public class LengthWeightParemetersTest extends ServiceLocalTestSupport {
Optional<Sex> optionalFemaleSex = Optional.ofNullable(sexDao.forCodeEquals("2").tryFindUnique().orNull());
Assert.assertTrue("Could not find sex with code 2 (female)", optionalFemaleSex.isPresent());
+ Optional<SizeMeasureType> optionalSizeMeasureType = Optional.ofNullable(sizeMeasureTypeDao.forCodeEquals("FL").tryFindUnique().orNull());
+ Assert.assertTrue("Could not find sizeMeasureType with code FL", optionalSizeMeasureType.isPresent());
+ SizeMeasureType sizeMeasureType = optionalSizeMeasureType.get();
+
Date firstStartDate = DateUtil.createDate(1, 1, 2010);
Date firstEndDate = DateUtil.createDate(31, 12, 2010);
Date secondStartDate = DateUtil.createDate(1, 1, 2011);
@@ -123,13 +132,13 @@ public class LengthWeightParemetersTest extends ServiceLocalTestSupport {
Ocean indianOcean = optionalIndianOcean.orElse(null);
// Ajout parametrage Male / Atlantique (2010)
- createLengthWeightParameter(lengthWeightParameterDao, species, atlanticOcean, maleSex, firstStartDate, firstEndDate);
+ createLengthWeightParameter(lengthWeightParameterDao, species, atlanticOcean, maleSex, sizeMeasureType, firstStartDate, firstEndDate);
// Ajout parametrage Male / Atlantique (après 2010)
- createLengthWeightParameter(lengthWeightParameterDao, species, atlanticOcean, maleSex, secondStartDate, null);
+ createLengthWeightParameter(lengthWeightParameterDao, species, atlanticOcean, maleSex, sizeMeasureType, secondStartDate, null);
// Ajout parametrage Male / Indien (2010)
- createLengthWeightParameter(lengthWeightParameterDao, species, indianOcean, maleSex, firstStartDate, firstEndDate);
+ createLengthWeightParameter(lengthWeightParameterDao, species, indianOcean, maleSex, sizeMeasureType, firstStartDate, firstEndDate);
// Ajout parametrage Male / Indien (Après 2010)
- createLengthWeightParameter(lengthWeightParameterDao, species, indianOcean, maleSex, secondStartDate, null);
+ createLengthWeightParameter(lengthWeightParameterDao, species, indianOcean, maleSex, sizeMeasureType, secondStartDate, null);
}
@@ -149,6 +158,7 @@ public class LengthWeightParemetersTest extends ServiceLocalTestSupport {
SpeciesTopiaDao speciesDAO = persistenceContext.getCommonSpeciesDao();
OceanTopiaDao oceanDAO = persistenceContext.getCommonOceanDao();
SexTopiaDao sexDao = persistenceContext.getCommonSexDao();
+ SizeMeasureTypeTopiaDao sizeMeasureTypeDao = persistenceContext.getCommonSizeMeasureTypeDao();
Optional<Species> optionalSpecies = Optional.ofNullable(speciesDAO.forFaoCodeEquals("ALB").tryFindUnique().orNull());
Assert.assertTrue("Could not find species with faoCode: DOL", optionalSpecies.isPresent());
@@ -184,47 +194,52 @@ public class LengthWeightParemetersTest extends ServiceLocalTestSupport {
Ocean indianOcean = optionalIndianOcean.orElse(null);
Ocean pacificOcean = optionalPacificOcean.orElse(null);
- assertFoundLengthWeightParameter(persistenceContext, species, atlanticOcean, null, undeterminedSex, date2009, date1970);
- assertFoundLengthWeightParameter(persistenceContext, species, atlanticOcean, undeterminedSex, undeterminedSex, date2009, date1970);
- assertFoundLengthWeightParameter(persistenceContext, species, atlanticOcean, maleSex, undeterminedSex, date2009, date1970);
- assertFoundLengthWeightParameter(persistenceContext, species, atlanticOcean, femaleSex, undeterminedSex, date2009, date1970);
- assertFoundLengthWeightParameter(persistenceContext, species, atlanticOcean, null, undeterminedSex, date2010, date1970);
- assertFoundLengthWeightParameter(persistenceContext, species, atlanticOcean, undeterminedSex, undeterminedSex, date2010, date1970);
- assertFoundLengthWeightParameter(persistenceContext, species, atlanticOcean, maleSex, maleSex, date2010, date2010);
- assertFoundLengthWeightParameter(persistenceContext, species, atlanticOcean, femaleSex, undeterminedSex, date2010, date1970);
+ Optional<SizeMeasureType> optionalSizeMeasureType = Optional.ofNullable(sizeMeasureTypeDao.forCodeEquals("FL").tryFindUnique().orNull());
+ Assert.assertTrue("Could not find sizeMeasureType with code FL", optionalSizeMeasureType.isPresent());
+ SizeMeasureType sizeMeasureType = optionalSizeMeasureType.get();
+
+ assertFoundLengthWeightParameter(persistenceContext, species, atlanticOcean, null, undeterminedSex, date2009, date1970, sizeMeasureType);
+ assertFoundLengthWeightParameter(persistenceContext, species, atlanticOcean, undeterminedSex, undeterminedSex, date2009, date1970, sizeMeasureType);
+ assertFoundLengthWeightParameter(persistenceContext, species, atlanticOcean, maleSex, undeterminedSex, date2009, date1970, sizeMeasureType);
+ assertFoundLengthWeightParameter(persistenceContext, species, atlanticOcean, femaleSex, undeterminedSex, date2009, date1970, sizeMeasureType);
+
+ assertFoundLengthWeightParameter(persistenceContext, species, atlanticOcean, null, undeterminedSex, date2010, date1970, sizeMeasureType);
+ assertFoundLengthWeightParameter(persistenceContext, species, atlanticOcean, undeterminedSex, undeterminedSex, date2010, date1970, sizeMeasureType);
+ assertFoundLengthWeightParameter(persistenceContext, species, atlanticOcean, maleSex, maleSex, date2010, date2010, sizeMeasureType);
+ assertFoundLengthWeightParameter(persistenceContext, species, atlanticOcean, femaleSex, undeterminedSex, date2010, date1970, sizeMeasureType);
- assertFoundLengthWeightParameter(persistenceContext, species, atlanticOcean, null, undeterminedSex, date2011, date1970);
- assertFoundLengthWeightParameter(persistenceContext, species, atlanticOcean, undeterminedSex, undeterminedSex, date2011, date1970);
- assertFoundLengthWeightParameter(persistenceContext, species, atlanticOcean, maleSex, maleSex, date2011, date2011);
- assertFoundLengthWeightParameter(persistenceContext, species, atlanticOcean, femaleSex, undeterminedSex, date2011, date1970);
+ assertFoundLengthWeightParameter(persistenceContext, species, atlanticOcean, null, undeterminedSex, date2011, date1970, sizeMeasureType);
+ assertFoundLengthWeightParameter(persistenceContext, species, atlanticOcean, undeterminedSex, undeterminedSex, date2011, date1970, sizeMeasureType);
+ assertFoundLengthWeightParameter(persistenceContext, species, atlanticOcean, maleSex, maleSex, date2011, date2011, sizeMeasureType);
+ assertFoundLengthWeightParameter(persistenceContext, species, atlanticOcean, femaleSex, undeterminedSex, date2011, date1970, sizeMeasureType);
// this test is now working!!! since we manage now perfectly null-null date range
- assertFoundLengthWeightParameter(persistenceContext, species, indianOcean, undeterminedSex, undeterminedSex, date2009, null);
- assertFoundLengthWeightParameter(persistenceContext, species, indianOcean, undeterminedSex, undeterminedSex, date2009, null);
- assertFoundLengthWeightParameter(persistenceContext, species, indianOcean, maleSex, undeterminedSex, date2009, null);
- assertFoundLengthWeightParameter(persistenceContext, species, indianOcean, femaleSex, undeterminedSex, date2009, null);
+ assertFoundLengthWeightParameter(persistenceContext, species, indianOcean, undeterminedSex, undeterminedSex, date2009, null, sizeMeasureType);
+ assertFoundLengthWeightParameter(persistenceContext, species, indianOcean, undeterminedSex, undeterminedSex, date2009, null, sizeMeasureType);
+ assertFoundLengthWeightParameter(persistenceContext, species, indianOcean, maleSex, undeterminedSex, date2009, null, sizeMeasureType);
+ assertFoundLengthWeightParameter(persistenceContext, species, indianOcean, femaleSex, undeterminedSex, date2009, null, sizeMeasureType);
- assertFoundLengthWeightParameter(persistenceContext, species, indianOcean, undeterminedSex, undeterminedSex, date2010, null);
- assertFoundLengthWeightParameter(persistenceContext, species, indianOcean, maleSex, maleSex, date2010, date2010);
- assertFoundLengthWeightParameter(persistenceContext, species, indianOcean, femaleSex, undeterminedSex, date2010, null);
+ assertFoundLengthWeightParameter(persistenceContext, species, indianOcean, undeterminedSex, undeterminedSex, date2010, null, sizeMeasureType);
+ assertFoundLengthWeightParameter(persistenceContext, species, indianOcean, maleSex, maleSex, date2010, date2010, sizeMeasureType);
+ assertFoundLengthWeightParameter(persistenceContext, species, indianOcean, femaleSex, undeterminedSex, date2010, null, sizeMeasureType);
- assertFoundLengthWeightParameter(persistenceContext, species, indianOcean, undeterminedSex, undeterminedSex, date2011, null);
- assertFoundLengthWeightParameter(persistenceContext, species, indianOcean, maleSex, maleSex, date2011, date2011);
- assertFoundLengthWeightParameter(persistenceContext, species, indianOcean, femaleSex, undeterminedSex, date2011, null);
+ assertFoundLengthWeightParameter(persistenceContext, species, indianOcean, undeterminedSex, undeterminedSex, date2011, null, sizeMeasureType);
+ assertFoundLengthWeightParameter(persistenceContext, species, indianOcean, maleSex, maleSex, date2011, date2011, sizeMeasureType);
+ assertFoundLengthWeightParameter(persistenceContext, species, indianOcean, femaleSex, undeterminedSex, date2011, null, sizeMeasureType);
- assertNotFoundLengthWeightParameter(persistenceContext, species, pacificOcean, undeterminedSex, date2010);
- assertNotFoundLengthWeightParameter(persistenceContext, species, pacificOcean, maleSex, date2010);
- assertNotFoundLengthWeightParameter(persistenceContext, species, pacificOcean, femaleSex, date2010);
+ assertNotFoundLengthWeightParameter(persistenceContext, species, pacificOcean, undeterminedSex, date2010, sizeMeasureType);
+ assertNotFoundLengthWeightParameter(persistenceContext, species, pacificOcean, maleSex, date2010, sizeMeasureType);
+ assertNotFoundLengthWeightParameter(persistenceContext, species, pacificOcean, femaleSex, date2010, sizeMeasureType);
}
- protected void assertFoundLengthWeightParameter(ObserveTopiaDaoSupplier supplier, Species species, Ocean ocean, Sex sex, Sex expectedSex, Date date, Date expectedStartDate) {
+ protected void assertFoundLengthWeightParameter(ObserveTopiaDaoSupplier supplier, Species species, Ocean ocean, Sex sex, Sex expectedSex, Date date, Date expectedStartDate, SizeMeasureType expectedSizeMeasureType) {
if (log.isInfoEnabled()) {
log.info("Try to find length weith parameter for species " + species.getFaoCode() + " - ocean " + ocean.getLabel1() + " - sex " + (sex == null ? "null" : sex.getLabel1()) + " at " + date);
}
- LengthWeightParameter lengthWeightParameter = LengthWeightParameters.findLengthWeightParameter(supplier, species, sex, ocean, date, null);
+ LengthWeightParameter lengthWeightParameter = LengthWeightParameters.findLengthWeightParameter(supplier, species, sex, ocean, date, expectedSizeMeasureType);
Assert.assertNotNull("length weith parameter not found for species " + species.getFaoCode() + " - ocean " + ocean.getLabel1() + " - sex " + (sex == null ? "null" : sex.getLabel1()) + " at " + date, lengthWeightParameter);
Assert.assertEquals("Expected sex is " + expectedSex.getLabel1() + " but the one found was " + lengthWeightParameter.getSex().getLabel1(), expectedSex, lengthWeightParameter.getSex());
@@ -234,13 +249,13 @@ public class LengthWeightParemetersTest extends ServiceLocalTestSupport {
}
}
- protected void assertNotFoundLengthWeightParameter(ObserveTopiaDaoSupplier supplier, Species species, Ocean ocean, Sex sex, Date date) {
+ protected void assertNotFoundLengthWeightParameter(ObserveTopiaDaoSupplier supplier, Species species, Ocean ocean, Sex sex, Date date, SizeMeasureType expectedSizeMeasureType) {
if (log.isInfoEnabled()) {
log.info("Try to find length weith parameter for species " + species.getFaoCode() + " - ocean " + ocean.getLabel1() + " - sex " + (sex == null ? "null" : sex.getLabel1()) + " at " + date);
}
try {
- LengthWeightParameters.findLengthWeightParameter(supplier, species, sex, ocean, date, null);
+ LengthWeightParameters.findLengthWeightParameter(supplier, species, sex, ocean, date, expectedSizeMeasureType);
Assert.fail();
} catch (LengthWeightParameterNotFoundException e) {
=====================================
test/src/main/resources/db/8.0/dataForTestLongline.sql.gz
=====================================
Binary files a/test/src/main/resources/db/8.0/dataForTestLongline.sql.gz and b/test/src/main/resources/db/8.0/dataForTestLongline.sql.gz differ
=====================================
test/src/main/resources/db/8.0/dataForTestSeine.sql.gz
=====================================
Binary files a/test/src/main/resources/db/8.0/dataForTestSeine.sql.gz and b/test/src/main/resources/db/8.0/dataForTestSeine.sql.gz differ
=====================================
test/src/main/resources/db/8.0/empty_h2.sql.gz
=====================================
Binary files a/test/src/main/resources/db/8.0/empty_h2.sql.gz and b/test/src/main/resources/db/8.0/empty_h2.sql.gz differ
=====================================
test/src/main/resources/db/8.0/empty_pg.sql.gz
=====================================
Binary files a/test/src/main/resources/db/8.0/empty_pg.sql.gz and b/test/src/main/resources/db/8.0/empty_pg.sql.gz differ
=====================================
test/src/main/resources/db/8.0/referentiel.sql.gz
=====================================
Binary files a/test/src/main/resources/db/8.0/referentiel.sql.gz and b/test/src/main/resources/db/8.0/referentiel.sql.gz differ
=====================================
test/src/main/resources/fixtures/count-referential-common.properties
=====================================
@@ -30,7 +30,7 @@ common.harbour=74
common.lastupdatedate=125
common.lengthlengthparameter=0
common.lengthmeasuremethod=4
-common.lengthweightparameter=365
+common.lengthweightparameter=361
common.ocean=3
common.ocean_species=500
common.organism=9
=====================================
test/src/main/resources/fixtures/validate-service-referential.properties
=====================================
@@ -41,7 +41,7 @@ VesselTypeDto=3
SexDto=2
NonTargetCatchReleaseConformityDto=2
MaturityStatusDto=3
-LengthWeightParameterDto=4
+LengthWeightParameterDto=3
NonTargetCatchReleaseStatusDto=2
SurroundingActivityDto=3
ItemVerticalPositionDto=1
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/39a2588a7c1e3cbc9c71f334a4…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/39a2588a7c1e3cbc9c71f334a4…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop] 2 commits: Revert "[PS][CALCUL] Problèmes de calcul avec quelques marées...
by Tony CHEMIT 16 Jul '19
by Tony CHEMIT 16 Jul '19
16 Jul '19
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
5d4a5e91 by tchemit at 2019-07-16T13:20:55Z
Revert "[PS][CALCUL] Problèmes de calcul avec quelques marées (findLengthLengthParameter) - Closes #1350"
This reverts commit 7f2e5857fb9b409b169c1f782ac90238adcfb87a.
- - - - -
39a2588a by tchemit at 2019-07-16T16:41:17Z
Renommer champs vessel.iattcid et vessel.ctoiid - Closes #1349
- - - - -
15 changed files:
- client-core/src/main/i18n/getters/jaxx.getter
- client-core/src/main/java/fr/ird/observe/client/ui/content/ref/common/VesselUI.jaxx
- dto/src/main/models/Observe-01-referential-common.model
- observe-i18n/src/main/i18n/translations/observe_en_GB.properties
- observe-i18n/src/main/i18n/translations/observe_es_ES.properties
- observe-i18n/src/main/i18n/translations/observe_fr_FR.properties
- persistence/src/main/java/fr/ird/observe/binder/referential/common/VesselEntityDtoBinder.java
- persistence/src/main/models/Observe-01-referential-common.model
- persistence/src/main/resources/db/migration/8.0/101_create_common_schema-common.sql
- services-local/src/main/java/fr/ird/observe/services/local/service/actions/consolidate/ConsolidateDataServiceLocal.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/empty_h2.sql.gz
- test/src/main/resources/db/8.0/empty_pg.sql.gz
- test/src/main/resources/db/8.0/referentiel.sql.gz
Changes:
=====================================
client-core/src/main/i18n/getters/jaxx.getter
=====================================
@@ -876,10 +876,10 @@ observe.common.VesselActivitySeineDto.allowFad
observe.common.VesselDto.capacity
observe.common.VesselDto.changeDate
observe.common.VesselDto.comId
-observe.common.VesselDto.ctoiId
+observe.common.VesselDto.iotcId
observe.common.VesselDto.flagCountry
observe.common.VesselDto.generalTab
-observe.common.VesselDto.iattcId
+observe.common.VesselDto.iccat
observe.common.VesselDto.imoId
observe.common.VesselDto.keelCodeFlotte
observe.common.VesselDto.length
=====================================
client-core/src/main/java/fr/ird/observe/client/ui/content/ref/common/VesselUI.jaxx
=====================================
@@ -220,13 +220,13 @@ fr.ird.observe.client.ui.util.BeanCheckBox
</cell>
</row>
- <!-- ctoiId -->
+ <!-- iotcId -->
<row>
<cell anchor="west">
- <JLabel id='ctoiIdLabel'/>
+ <JLabel id='iotcIdLabel'/>
</cell>
<cell anchor='east' weightx="1" fill="both">
- <NormalTextEditor id='ctoiId'/>
+ <NormalTextEditor id='iotcId'/>
</cell>
</row>
@@ -240,13 +240,13 @@ fr.ird.observe.client.ui.util.BeanCheckBox
</cell>
</row>
- <!-- iattcId -->
+ <!-- iccat -->
<row>
<cell anchor="west">
- <JLabel id='iattcIdLabel'/>
+ <JLabel id='iccatLabel'/>
</cell>
<cell anchor='east' weightx="1" fill="both">
- <NormalTextEditor id='iattcId'/>
+ <NormalTextEditor id='iccat'/>
</cell>
</row>
=====================================
dto/src/main/models/Observe-01-referential-common.model
=====================================
@@ -148,8 +148,8 @@ capacity + {*:1} Float
power + {*:1} Integer
searchMaximum + {*:1} Float
comment + {*:1} String
-iattcId + {*:1} String
-ctoiId + {*:1} String
+iccat + {*:1} String
+iotcId + {*:1} String
nationalId + {*:1} String
comId + {*:1} String
tuviId + {*:1} String
=====================================
observe-i18n/src/main/i18n/translations/observe_en_GB.properties
=====================================
@@ -2500,11 +2500,11 @@ observe.common.VesselActivitySeineDto.types=Vessel activities (Seine)
observe.common.VesselDto.capacity=Capacity
observe.common.VesselDto.changeDate=Change date
observe.common.VesselDto.comId=EU Id
-observe.common.VesselDto.ctoiId=IOTC id
+observe.common.VesselDto.iotcId=IOTC id
observe.common.VesselDto.flagCountry=Flag country
observe.common.VesselDto.fleetCountry=Fleet country
observe.common.VesselDto.generalTab=General caracteristics
-observe.common.VesselDto.iattcId=ICCAT Id
+observe.common.VesselDto.iccat=ICCAT Id
observe.common.VesselDto.imoId=IMO Id
observe.common.VesselDto.keelCode=Keel code
observe.common.VesselDto.keelCodeFlotte=Keel / Flotte
=====================================
observe-i18n/src/main/i18n/translations/observe_es_ES.properties
=====================================
@@ -2500,11 +2500,11 @@ observe.common.VesselActivitySeineDto.types=Actividades buque \#TODO-SP
observe.common.VesselDto.capacity=Capacidad de transporte
observe.common.VesselDto.changeDate=Fecha de carga
observe.common.VesselDto.comId=Id EU
-observe.common.VesselDto.ctoiId=Id IOTC
+observe.common.VesselDto.iotcId=Id IOTC
observe.common.VesselDto.flagCountry=Bandera
observe.common.VesselDto.fleetCountry=País
observe.common.VesselDto.generalTab=Características generales
-observe.common.VesselDto.iattcId=Id CICAA
+observe.common.VesselDto.iccat=Id CICAA
observe.common.VesselDto.imoId=Id IMO
observe.common.VesselDto.keelCode=Código de Quilla
observe.common.VesselDto.keelCodeFlotte=Código de Quilla / Flota
=====================================
observe-i18n/src/main/i18n/translations/observe_fr_FR.properties
=====================================
@@ -2500,11 +2500,11 @@ observe.common.VesselActivitySeineDto.types=Activités bateau (Senne)
observe.common.VesselDto.capacity=Capacité transport (m³)
observe.common.VesselDto.changeDate=Date changement pavillon
observe.common.VesselDto.comId=Id EU
-observe.common.VesselDto.ctoiId=Id CTOI
+observe.common.VesselDto.iotcId=Id CTOI
observe.common.VesselDto.flagCountry=Pavillon
observe.common.VesselDto.fleetCountry=Flotte
observe.common.VesselDto.generalTab=Caractéristiques générales
-observe.common.VesselDto.iattcId=Id CICTA
+observe.common.VesselDto.iccat=Id CICTA
observe.common.VesselDto.imoId=Id IMO
observe.common.VesselDto.keelCode=Code quille
observe.common.VesselDto.keelCodeFlotte=Code quille /Code flotte
=====================================
persistence/src/main/java/fr/ird/observe/binder/referential/common/VesselEntityDtoBinder.java
=====================================
@@ -56,8 +56,8 @@ public class VesselEntityDtoBinder extends ReferentialEntityDtoBinderSupport<Ves
entity.setSearchMaximum(dto.getSearchMaximum());
entity.setComment(dto.getComment());
entity.setComId(dto.getComId());
- entity.setCtoiId(dto.getCtoiId());
- entity.setIattcId(dto.getIattcId());
+ entity.setIotcId(dto.getIotcId());
+ entity.setIccat(dto.getIccat());
entity.setImoId(dto.getImoId());
entity.setNationalId(dto.getNationalId());
entity.setRadioCallSignId(dto.getRadioCallSignId());
@@ -83,8 +83,8 @@ public class VesselEntityDtoBinder extends ReferentialEntityDtoBinderSupport<Ves
dto.setSearchMaximum(entity.getSearchMaximum());
dto.setComment(entity.getComment());
dto.setComId(entity.getComId());
- dto.setCtoiId(entity.getCtoiId());
- dto.setIattcId(entity.getIattcId());
+ dto.setIotcId(entity.getIotcId());
+ dto.setIccat(entity.getIccat());
dto.setImoId(entity.getImoId());
dto.setNationalId(entity.getNationalId());
dto.setRadioCallSignId(entity.getRadioCallSignId());
=====================================
persistence/src/main/models/Observe-01-referential-common.model
=====================================
@@ -163,8 +163,8 @@ capacity + {*:1} Float | sqlType=numeric
power + {*:1} Integer
searchMaximum + {*:1} Float | sqlType=numeric
comment + {*:1} String | hibernateAttributeType=text
-iattcId + {*:1} String
-ctoiId + {*:1} String
+iccat + {*:1} String
+iotcId + {*:1} String
nationalId + {*:1} String
comId + {*:1} String
tuviId + {*:1} String
=====================================
persistence/src/main/resources/db/migration/8.0/101_create_common_schema-common.sql
=====================================
@@ -46,7 +46,7 @@ CREATE TABLE common.speciesgroupreleasemode(topiaid VARCHAR(255) NOT NULL CONSTR
CREATE TABLE common.specieslist(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_specieslist PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
CREATE TABLE common.vesselsizecategory(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_vesselsizecategory PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE NOT NULL, code VARCHAR(255), uri VARCHAR(255), status INTEGER DEFAULT 1, capacitylabel VARCHAR(255), gaugelabel VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
CREATE TABLE common.vesseltype(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_vesseltype PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE NOT NULL, code VARCHAR(255), uri VARCHAR(255), status INTEGER DEFAULT 1, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
-CREATE TABLE common.vessel(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_vessel PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE NOT NULL, code VARCHAR(255), keelcode INTEGER, fleetcountry INTEGER, changedate TIMESTAMP, yearservice INTEGER, length NUMERIC, capacity NUMERIC, power INTEGER, searchmaximum NUMERIC, uri VARCHAR(255), status INTEGER DEFAULT 1, comment VARCHAR(1025), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), flagcountry VARCHAR(255), vesseltype VARCHAR(255), vesselsizecategory VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, comid VARCHAR(255), ctoiid VARCHAR(255), iattcid VARCHAR(255), imoid VARCHAR(255), nationalid VARCHAR(255), radiocallsignid VARCHAR(255), tuviid VARCHAR(255), shipowner VARCHAR(255));
+CREATE TABLE common.vessel(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_vessel PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE NOT NULL, code VARCHAR(255), keelcode INTEGER, fleetcountry INTEGER, changedate TIMESTAMP, yearservice INTEGER, length NUMERIC, capacity NUMERIC, power INTEGER, searchmaximum NUMERIC, uri VARCHAR(255), status INTEGER DEFAULT 1, comment VARCHAR(1025), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), flagcountry VARCHAR(255), vesseltype VARCHAR(255), vesselsizecategory VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, comid VARCHAR(255), iotcId VARCHAR(255), iccat VARCHAR(255), imoid VARCHAR(255), nationalid VARCHAR(255), radiocallsignid VARCHAR(255), tuviid VARCHAR(255), shipowner VARCHAR(255));
CREATE TABLE common.weightmeasuremethod(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_weightmeasuremethod PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE NOT NULL, lastupdatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, needcomment BOOLEAN DEFAULT FALSE, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255));
CREATE TABLE common.weightmeasuretype(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_weightmeasuretype PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE NOT NULL, lastupdatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, needcomment BOOLEAN DEFAULT FALSE, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255));
CREATE TABLE common.wind(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_wind PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE NOT NULL, code VARCHAR(255), speedrange VARCHAR(255), waveheight VARCHAR(255), uri VARCHAR(255), status INTEGER DEFAULT 1, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL);
@@ -79,7 +79,7 @@ INSERT INTO common.speciesgroupreleasemode(topiaid, topiaversion, topiacreatedat
INSERT INTO common.specieslist(topiaid, topiaversion, topiacreatedate, code, status, uri, label1, label2, label3, label4, label5, label6, label7, label8, needcomment, lastupdatedate) SELECT topiaid, topiaversion, topiacreatedate, code, status, uri, label1, label2, label3, label4, label5, label6, label7, label8, needcomment, lastupdatedate FROM observe_common.specieslist;
INSERT INTO common.vesselsizecategory(topiaid, topiaversion, topiacreatedate, code, uri, status, capacitylabel, gaugelabel, needcomment, lastupdatedate) SELECT topiaid, topiaversion, topiacreatedate, code, uri, status, capacitylabel, gaugelabel, needcomment, lastupdatedate FROM observe_common.vesselsizecategory;
INSERT INTO common.vesseltype(topiaid, topiaversion, topiacreatedate, code, uri, status, label1, label2, label3, label4, label5, label6, label7, label8, needcomment, lastupdatedate) SELECT topiaid, topiaversion, topiacreatedate, code, uri, status, label1, label2, label3, label4, label5, label6, label7, label8, needcomment, lastupdatedate FROM observe_common.vesseltype;
-INSERT INTO common.vessel(topiaid, topiaversion, topiacreatedate, code, keelcode, fleetcountry, changedate, yearservice, length, capacity, power, searchmaximum, uri, status, comment, label1, label2, label3, label4, label5, label6, label7, label8, flagcountry, vesseltype, vesselsizecategory, needcomment, lastupdatedate, comid, ctoiid, iattcid, imoid, nationalid, radiocallsignid, tuviid, shipowner) SELECT topiaid, topiaversion, topiacreatedate, code, keelcode, fleetcountry, changedate, yearservice, length, capacity, power, searchmaximum, uri, status, comment, label1, label2, label3, label4, label5, label6, label7, label8, flagcountry, vesseltype, vesselsizecategory, needcomment, lastupdatedate, comid, ctoiid, iattcid, imoid, nationalid, radiocallsignid, tuviid, shipowner FROM observe_common.vessel;
+INSERT INTO common.vessel(topiaid, topiaversion, topiacreatedate, code, keelcode, fleetcountry, changedate, yearservice, length, capacity, power, searchmaximum, uri, status, comment, label1, label2, label3, label4, label5, label6, label7, label8, flagcountry, vesseltype, vesselsizecategory, needcomment, lastupdatedate, comid, iotcId, iccat, imoid, nationalid, radiocallsignid, tuviid, shipowner) SELECT topiaid, topiaversion, topiacreatedate, code, keelcode, fleetcountry, changedate, yearservice, length, capacity, power, searchmaximum, uri, status, comment, label1, label2, label3, label4, label5, label6, label7, label8, flagcountry, vesseltype, vesselsizecategory, needcomment, lastupdatedate, comid, ctoiid, iattcid, imoid, nationalid, radiocallsignid, tuviid, shipowner FROM observe_common.vessel;
INSERT INTO common.weightmeasuremethod(topiaid, topiaversion, topiacreatedate, lastupdatedate, code, status, needcomment, uri, label1, label2, label3, label4, label5, label6, label7, label8) SELECT topiaid, topiaversion, topiacreatedate, lastupdatedate, code, status, needcomment, uri, label1, label2, label3, label4, label5, label6, label7, label8 FROM observe_common.weightmeasuremethod;
INSERT INTO common.weightmeasuretype(topiaid, topiaversion, topiacreatedate, lastupdatedate, code, status, needcomment, uri, label1, label2, label3, label4, label5, label6, label7, label8) SELECT topiaid, topiaversion, topiacreatedate, lastupdatedate, code, status, needcomment, uri, label1, label2, label3, label4, label5, label6, label7, label8 FROM observe_common.weightmeasuretype;
INSERT INTO common.wind(topiaid, topiaversion, topiacreatedate, code, speedrange, waveheight, uri, status, label1, label2, label3, label4, label5, label6, label7, label8, needcomment, lastupdatedate) SELECT topiaid, topiaversion, topiacreatedate, code, speedrange, waveheight, uri, status, label1, label2, label3, label4, label5, label6, label7, label8, needcomment, lastupdatedate FROM observe_common.wind;
=====================================
services-local/src/main/java/fr/ird/observe/services/local/service/actions/consolidate/ConsolidateDataServiceLocal.java
=====================================
@@ -695,10 +695,6 @@ public class ConsolidateDataServiceLocal extends ObserveServiceLocal implements
}
SizeMeasureType outputSizeMeasureType = lengthWeightParameter.getSizeMeasureType();
- if (outputSizeMeasureType == null) {
- log.error(String.format("No size measure type found for LengthWeightParameter (%s) will use the one of the species", lengthWeightParameter.getTopiaId()));
- outputSizeMeasureType = lengthWeightParameter.getSpecies().getSizeMeasureType();
- }
if (!Objects.equals(inputSizeMeasureType, outputSizeMeasureType)) {
// on doit effectuer une conversion taille - taille avant de convertir en poids
=====================================
test/src/main/resources/db/8.0/dataForTestLongline.sql.gz
=====================================
Binary files a/test/src/main/resources/db/8.0/dataForTestLongline.sql.gz and b/test/src/main/resources/db/8.0/dataForTestLongline.sql.gz differ
=====================================
test/src/main/resources/db/8.0/dataForTestSeine.sql.gz
=====================================
Binary files a/test/src/main/resources/db/8.0/dataForTestSeine.sql.gz and b/test/src/main/resources/db/8.0/dataForTestSeine.sql.gz differ
=====================================
test/src/main/resources/db/8.0/empty_h2.sql.gz
=====================================
Binary files a/test/src/main/resources/db/8.0/empty_h2.sql.gz and b/test/src/main/resources/db/8.0/empty_h2.sql.gz differ
=====================================
test/src/main/resources/db/8.0/empty_pg.sql.gz
=====================================
Binary files a/test/src/main/resources/db/8.0/empty_pg.sql.gz and b/test/src/main/resources/db/8.0/empty_pg.sql.gz differ
=====================================
test/src/main/resources/db/8.0/referentiel.sql.gz
=====================================
Binary files a/test/src/main/resources/db/8.0/referentiel.sql.gz and b/test/src/main/resources/db/8.0/referentiel.sql.gz differ
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/7f2e5857fb9b409b169c1f782a…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/7f2e5857fb9b409b169c1f782a…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop-7.x] 2 commits: Consolidation des champs techniques en base - closes #1353
by Tony CHEMIT 16 Jul '19
by Tony CHEMIT 16 Jul '19
16 Jul '19
Tony CHEMIT pushed to branch develop-7.x at ultreiaio / ird-observe
Commits:
c1536213 by tchemit at 2019-07-16T15:51:56Z
Consolidation des champs techniques en base - closes #1353
- - - - -
38f8daf4 by tchemit at 2019-07-16T16:32:33Z
Problème synchro avancée référentiel - Closes #1352
- - - - -
11 changed files:
- persistence/pom.xml
- persistence/src/main/java/fr/ird/observe/persistence/migration/DataSourceMigrationForVersion_7_1.java
- + persistence/src/main/resources/db/migration/7.1/03_add_not_null_on_technical_fields-common.sql
- pom.xml
- services-local/src/main/java/fr/ird/observe/services/local/service/actions/synchro/referential/ng/ReferentialSynchronizeSqlsRequestBuilder.java
- services/src/main/java/fr/ird/observe/services/service/actions/synchro/referential/ng/ReferentialSynchronizeRequest.java
- test/src/main/resources/db/7.1/dataForTestLongline.sql.gz
- test/src/main/resources/db/7.1/dataForTestSeine.sql.gz
- test/src/main/resources/db/7.1/empty_h2.sql.gz
- test/src/main/resources/db/7.1/empty_pg.sql.gz
- test/src/main/resources/db/7.1/referentiel.sql.gz
Changes:
=====================================
persistence/pom.xml
=====================================
@@ -274,6 +274,7 @@
</inputs>
<templates>
org.nuiton.topia.templates.TopiaEntityDaoTransformer,
+ org.nuiton.topia.templates.TopiaEntityHibernateMappingGenerator,
org.nuiton.topia.templates.TopiaMetaTransformer,
org.nuiton.topia.templates.TopiaMetadataModelGenerator
</templates>
=====================================
persistence/src/main/java/fr/ird/observe/persistence/migration/DataSourceMigrationForVersion_7_1.java
=====================================
@@ -44,6 +44,7 @@ public class DataSourceMigrationForVersion_7_1 extends MigrationVersionResource
public void generateSqlScript(MigrationVersionResourceExecutor executor) {
executor.addScript("01", "add_not_null_on_length_weight_parameters");
executor.addScript("02", "add_not_null_on_length_length_parameters");
+ executor.addScript("03", "add_not_null_on_technical_fields");
}
}
=====================================
persistence/src/main/resources/db/migration/7.1/03_add_not_null_on_technical_fields-common.sql
=====================================
@@ -0,0 +1,126 @@
+---
+-- #%L
+-- ObServe :: Persistence
+-- %%
+-- Copyright (C) 2008 - 2019 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%
+---
+ALTER TABLE observe_longline.Activity ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_longline.BaitsComposition ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_longline.Basket ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_longline.Branchline ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_longline.BranchlinesComposition ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_longline.Catch ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_longline.Encounter ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_longline.FloatlinesComposition ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_longline.GearUseFeatures ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_longline.GearUseFeaturesMeasurement ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_longline.HooksComposition ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_longline.Section ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_longline.SensorUsed ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_longline.Set ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_longline.SizeMeasure ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_longline.Tdr ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_longline.TdrRecord ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_longline.Trip ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_longline.WeightMeasure ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_common.Country ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_common.DataQuality ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_common.FpaZone ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_common.Gear ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_common.GearCaracteristic ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_common.GearCaracteristicType ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_common.Harbour ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_common.LastUpdateDate ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_common.LengthLengthParameter ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_common.LengthWeightParameter ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_common.Ocean ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_common.Organism ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_common.Person ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_common.Program ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_common.Sex ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_common.ShipOwner ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_common.SizeMeasureType ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_common.Species ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_common.SpeciesGroup ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_common.SpeciesGroupReleaseMode ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_common.SpeciesList ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_common.Vessel ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_common.VesselSizeCategory ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_common.VesselType ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_common.WeightMeasureType ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_longline.BaitHaulingStatus ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_longline.BaitSettingStatus ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_longline.BaitType ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_longline.CatchFate ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_longline.EncounterType ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_longline.Healthness ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_longline.HookPosition ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_longline.HookSize ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_longline.HookType ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_longline.ItemHorizontalPosition ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_longline.ItemVerticalPosition ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_longline.LightsticksColor ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_longline.LightsticksType ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_longline.LineType ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_longline.MaturityStatus ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_longline.MitigationType ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_longline.SensorBrand ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_longline.SensorDataFormat ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_longline.SensorType ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_longline.SettingShape ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_longline.StomacFullness ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_longline.TripType ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_longline.VesselActivity ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_seine.DetectionMode ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_seine.NonTargetCatchReleaseConformity ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_seine.NonTargetCatchReleaseStatus ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_seine.NonTargetCatchReleasingTime ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_seine.ObjectMaterial ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_seine.ObjectMaterialType ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_seine.ObjectOperation ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_seine.ObservedSystem ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_seine.ReasonForDiscard ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_seine.ReasonForNoFishing ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_seine.ReasonForNullSet ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_seine.SpeciesFate ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_seine.SpeciesStatus ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_seine.SurroundingActivity ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_seine.TransmittingBuoyOperation ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_seine.TransmittingBuoyType ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_seine.VesselActivity ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_seine.WeightCategory ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_seine.Wind ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_seine.Activity ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_seine.FloatingObject ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_seine.FloatingObjectPart ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_seine.GearUseFeaturesMeasurement ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_seine.GearUseFeatures ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_seine.NonTargetCatch ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_seine.NonTargetCatchRelease ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_seine.NonTargetLength ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_seine.NonTargetSample ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_seine.ObjectObservedSpecies ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_seine.ObjectSchoolEstimate ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_seine.Route ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_seine.SchoolEstimate ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_seine.Set ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_seine.TargetCatch ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_seine.TargetLength ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_seine.TargetSample ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_seine.TransmittingBuoy ALTER COLUMN topiaCreateDate SET NOT NULL;
+ALTER TABLE observe_seine.Trip ALTER COLUMN topiaCreateDate SET NOT NULL;
=====================================
pom.xml
=====================================
@@ -165,7 +165,7 @@
<lib.version.java4all.eugene>3.0-alpha-26</lib.version.java4all.eugene>
<!--lib.version.java4all.jaxx>3.0-alpha-50</lib.version.java4all.jaxx-->
<!--<lib.version.java4all.i18n>4.0-beta-8-SNAPSHOT</lib.version.java4all.i18n>-->
- <lib.version.java4all.topia>1.1.15</lib.version.java4all.topia>
+ <lib.version.java4all.topia>1.1.16</lib.version.java4all.topia>
<!--<lib.version.nuiton.topia>3.6-SNAPSHOT</lib.version.nuiton.topia>-->
<!--<lib.version.java4all.eugene>3.0-alpha-21</lib.version.java4all.eugene>-->
=====================================
services-local/src/main/java/fr/ird/observe/services/local/service/actions/synchro/referential/ng/ReferentialSynchronizeSqlsRequestBuilder.java
=====================================
@@ -22,8 +22,10 @@ package fr.ird.observe.services.local.service.actions.synchro.referential.ng;
* #L%
*/
+import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Multimap;
import fr.ird.observe.binder.referential.ReferentialEntityDtoBinderSupport;
import fr.ird.observe.dto.reference.ReferentialDtoReference;
import fr.ird.observe.dto.referential.ReferentialDto;
@@ -90,14 +92,17 @@ public class ReferentialSynchronizeSqlsRequestBuilder {
ImmutableSet<Class<? extends ReferentialDtoReference>> types = request.getTypes();
+
+ Multimap<Class<? extends ReferentialDtoReference>, String> newIds = request.getNewIds();
+
for (Class<? extends ReferentialDto> dtoType : DtoModelClasses.REFERENTIAL_TYPES) {
- build0(dtoType, types);
+ build0(dtoType, types, newIds);
}
return resultBuilder.build();
}
- private <D extends ReferentialDto, R extends ReferentialDtoReference<D, R>, E extends ObserveReferentialEntity> void build0(Class<D> dtoType, ImmutableSet<Class<? extends ReferentialDtoReference>> types) {
+ private <D extends ReferentialDto, R extends ReferentialDtoReference<D, R>, E extends ObserveReferentialEntity> void build0(Class<D> dtoType, ImmutableSet<Class<? extends ReferentialDtoReference>> types, Multimap<Class<? extends ReferentialDtoReference>, String> newIds) {
ReferentialDtoEntityContext<D, R, E> modelContext = DbModelHelper.fromReferentialDto(dtoType);
Class<R> referenceType = modelContext.toReferenceType();
@@ -117,13 +122,13 @@ public class ReferentialSynchronizeSqlsRequestBuilder {
if (log.isInfoEnabled()) {
log.info("Add: " + addTasks.size());
}
- onAdd(referentialName, referenceType, addTasks, binder);
+ onAdd(referentialName, referenceType, addTasks, binder, newIds);
Set<ReferentialSynchronizeTask<R>> updateTasks = request.getUpdateTasks(referenceType);
if (log.isInfoEnabled()) {
log.info("Update: " + updateTasks.size());
}
- onUpdate(referentialName, referenceType, updateTasks, binder);
+ onUpdate(referentialName, referenceType, updateTasks, binder, newIds);
Set<ReferentialSynchronizeTask<R>> revertTasks = request.getRevertTasks(referenceType);
if (log.isInfoEnabled()) {
@@ -145,7 +150,7 @@ public class ReferentialSynchronizeSqlsRequestBuilder {
}
- private <D extends ReferentialDto, R extends ReferentialDtoReference<D, R>, E extends ObserveReferentialEntity> void onAdd(String referentialName, Class<R> referenceType, Set<ReferentialSynchronizeTask<R>> tasks, ReferentialEntityDtoBinderSupport<D, E> binder) {
+ private <D extends ReferentialDto, R extends ReferentialDtoReference<D, R>, E extends ObserveReferentialEntity> void onAdd(String referentialName, Class<R> referenceType, Set<ReferentialSynchronizeTask<R>> tasks, ReferentialEntityDtoBinderSupport<D, E> binder, Multimap<Class<? extends ReferentialDtoReference>, String> newIds) {
Class<E> entityType = binder.getEntityType();
Class<D> dtoType = binder.getDtoType();
@@ -153,7 +158,9 @@ public class ReferentialSynchronizeSqlsRequestBuilder {
List<E> insertEntities = loadEntities(entityType, tasks);
if (metadata.withEntities()) {
- InsertSqlWithCascadeStatementGenerator<D> insertGenerator = new InsertSqlWithCascadeStatementGenerator<D>(metadataModel, metadata, dtoType, request.getIdsOnlyExistingOnThisSide()) {
+ Multimap<Class<? extends ReferentialDtoReference>, String> allIds = ArrayListMultimap.create(request.getIdsOnlyExistingOnThisSide());
+ allIds.putAll(newIds);
+ InsertSqlWithCascadeStatementGenerator<D> insertGenerator = new InsertSqlWithCascadeStatementGenerator<D>(metadataModel, metadata, dtoType, allIds) {
@Override
protected <DD extends ReferentialDto> ImmutableList<String> insertMissingReferential(Class<DD> referentialType, String id) {
@@ -188,7 +195,7 @@ public class ReferentialSynchronizeSqlsRequestBuilder {
}
- private <D extends ReferentialDto, R extends ReferentialDtoReference<D, R>, E extends ObserveReferentialEntity> void onUpdate(String referentialName, Class<R> referenceType, Set<ReferentialSynchronizeTask<R>> tasks, ReferentialEntityDtoBinderSupport<D, E> binder) {
+ private <D extends ReferentialDto, R extends ReferentialDtoReference<D, R>, E extends ObserveReferentialEntity> void onUpdate(String referentialName, Class<R> referenceType, Set<ReferentialSynchronizeTask<R>> tasks, ReferentialEntityDtoBinderSupport<D, E> binder, Multimap<Class<? extends ReferentialDtoReference>, String> newIds) {
Class<D> dtoType = binder.getDtoType();
TopiaMetadataEntity metadata = metadataModel.getEntity(referentialName);
@@ -197,6 +204,10 @@ public class ReferentialSynchronizeSqlsRequestBuilder {
if (metadata.withEntities()) {
+
+ Multimap<Class<? extends ReferentialDtoReference>, String> allIds = ArrayListMultimap.create(request.getIdsOnlyExistingOnThisSide());
+ allIds.putAll(newIds);
+
UpdateSqlWithCascadeStatementGenerator<D> updateGenerator = new UpdateSqlWithCascadeStatementGenerator<D>(metadataModel, metadata, dtoType, request.getIdsOnlyExistingOnThisSide()) {
@Override
=====================================
services/src/main/java/fr/ird/observe/services/service/actions/synchro/referential/ng/ReferentialSynchronizeRequest.java
=====================================
@@ -71,6 +71,14 @@ public class ReferentialSynchronizeRequest implements ObserveDto {
return idsOnlyExistingOnThisSide;
}
+ public Multimap<Class<? extends ReferentialDtoReference>, String> getNewIds() {
+ Multimap<Class<? extends ReferentialDtoReference>, String> result = ArrayListMultimap.create();
+ for (ReferentialSynchronizeTask<?> task : tasks.get(ReferentialSynchronizeTaskType.ADD)) {
+ result.put(task.getReferentialType(), task.getReferentialId());
+ }
+ return result;
+ }
+
public ImmutableMultimap<ReferentialSynchronizeTaskType, ReferentialSynchronizeTask<?>> getTasks() {
return tasks;
}
=====================================
test/src/main/resources/db/7.1/dataForTestLongline.sql.gz
=====================================
Binary files a/test/src/main/resources/db/7.1/dataForTestLongline.sql.gz and b/test/src/main/resources/db/7.1/dataForTestLongline.sql.gz differ
=====================================
test/src/main/resources/db/7.1/dataForTestSeine.sql.gz
=====================================
Binary files a/test/src/main/resources/db/7.1/dataForTestSeine.sql.gz and b/test/src/main/resources/db/7.1/dataForTestSeine.sql.gz differ
=====================================
test/src/main/resources/db/7.1/empty_h2.sql.gz
=====================================
Binary files a/test/src/main/resources/db/7.1/empty_h2.sql.gz and b/test/src/main/resources/db/7.1/empty_h2.sql.gz differ
=====================================
test/src/main/resources/db/7.1/empty_pg.sql.gz
=====================================
Binary files a/test/src/main/resources/db/7.1/empty_pg.sql.gz and b/test/src/main/resources/db/7.1/empty_pg.sql.gz differ
=====================================
test/src/main/resources/db/7.1/referentiel.sql.gz
=====================================
Binary files a/test/src/main/resources/db/7.1/referentiel.sql.gz and b/test/src/main/resources/db/7.1/referentiel.sql.gz differ
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/35286e05f0d60e0e89bf4b10ae…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/35286e05f0d60e0e89bf4b10ae…
You're receiving this email because of your account on gitlab.com.
1
0
[Git][ultreiaio/ird-observe][develop-7.x] 2 commits: move to version 7.1.0 [skip ci]
by Tony CHEMIT 16 Jul '19
by Tony CHEMIT 16 Jul '19
16 Jul '19
Tony CHEMIT pushed to branch develop-7.x at ultreiaio / ird-observe
Commits:
b89ed2cb by tchemit at 2019-07-16T13:37:58Z
move to version 7.1.0 [skip ci]
- - - - -
35286e05 by tchemit at 2019-07-16T14:58:30Z
[REF] Consolidation du réferentiel common.LengthWeightParameter - Closes #1350
[REF] Consolidation du réferentiel common.LengthLengthParameter - Closes #1351
- - - - -
30 changed files:
- client-configuration/pom.xml
- client-core/pom.xml
- client-runner/pom.xml
- dto/pom.xml
- observe-i18n/pom.xml
- observe-i18n/src/main/i18n/translations/observe_fr_FR.properties
- observe/pom.xml
- persistence/pom.xml
- + persistence/src/main/java/fr/ird/observe/persistence/migration/DataSourceMigrationForVersion_7_1.java
- persistence/src/main/models/Observe.model
- + persistence/src/main/resources/db/migration/7.1/01_add_not_null_on_length_weight_parameters-common.sql
- + persistence/src/main/resources/db/migration/7.1/02_add_not_null_on_length_length_parameters-common.sql
- pom.xml
- server-configuration/pom.xml
- server-core/pom.xml
- server-runner/pom.xml
- services-client/pom.xml
- services-local/pom.xml
- services-local/src/main/java/fr/ird/observe/services/local/service/actions/consolidate/ConsolidateDataServiceLocal.java
- services-local/src/test/java/fr/ird/observe/services/local/entity/LengthWeightParemetersTest.java
- services-local/src/test/java/fr/ird/observe/services/local/service/actions/validate/ValidateServiceLocalTest.java
- services/pom.xml
- test/pom.xml
- test/src/main/java/fr/ird/observe/test/ObserveFixtures.java
- + test/src/main/resources/db/7.1/dataForTestLongline.sql.gz
- + test/src/main/resources/db/7.1/dataForTestSeine.sql.gz
- + test/src/main/resources/db/7.1/empty_h2.sql.gz
- + test/src/main/resources/db/7.1/empty_pg.sql.gz
- + test/src/main/resources/db/7.1/referentiel.sql.gz
- validation/pom.xml
Changes:
=====================================
client-configuration/pom.xml
=====================================
@@ -26,7 +26,7 @@
<parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0.9-SNAPSHOT</version>
+ <version>7.1.0-SNAPSHOT</version>
</parent>
<artifactId>client-configuration</artifactId>
=====================================
client-core/pom.xml
=====================================
@@ -26,7 +26,7 @@
<parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0.9-SNAPSHOT</version>
+ <version>7.1.0-SNAPSHOT</version>
</parent>
<artifactId>client-core</artifactId>
=====================================
client-runner/pom.xml
=====================================
@@ -26,7 +26,7 @@
<parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0.9-SNAPSHOT</version>
+ <version>7.1.0-SNAPSHOT</version>
</parent>
<artifactId>client-runner</artifactId>
=====================================
dto/pom.xml
=====================================
@@ -27,7 +27,7 @@
<parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0.9-SNAPSHOT</version>
+ <version>7.1.0-SNAPSHOT</version>
</parent>
<artifactId>dto</artifactId>
=====================================
observe-i18n/pom.xml
=====================================
@@ -26,7 +26,7 @@
<parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0.9-SNAPSHOT</version>
+ <version>7.1.0-SNAPSHOT</version>
</parent>
<artifactId>observe-i18n</artifactId>
=====================================
observe-i18n/src/main/i18n/translations/observe_fr_FR.properties
=====================================
@@ -824,7 +824,7 @@ observe.common.LengthLengthParameterDto.types=Relations Taille-Taille
observe.common.LengthWeightParameterDto.coefficients=Coefficients
observe.common.LengthWeightParameterDto.generalTab=Caractéristiques générales
observe.common.LengthWeightParameterDto.lengthWeightFormula=Relation Poids
-observe.common.LengthWeightParameterDto.lengthWeightFormulaInformation=La relation poids permet de calculer le poids à partir de la taille
+observe.common.LengthWeightParameterDto.lengthWeightFormulaInformation=La relation poids permet de calculer le poids à partir de la taille, elle doit contenir la variable L (length) qui représente la taille d'entrée
observe.common.LengthWeightParameterDto.meanLength=Taille moyenne (en cm)
observe.common.LengthWeightParameterDto.meanValues=Valeurs moyennes
observe.common.LengthWeightParameterDto.meanWeight=Poids moyen (en Kg)
@@ -832,7 +832,7 @@ observe.common.LengthWeightParameterDto.otherTab=Autres caractéristiques
observe.common.LengthWeightParameterDto.type=Relation Taille-Poids
observe.common.LengthWeightParameterDto.types=Relations Taille-Poids
observe.common.LengthWeightParameterDto.weightLengthFormula=Relation Taille
-observe.common.LengthWeightParameterDto.weightLengthFormulaInformation=La relation taille permet de calculer la taille à partir du poids
+observe.common.LengthWeightParameterDto.weightLengthFormulaInformation=La relation taille permet de calculer la taille à partir du poids, elle doit contenir la variable P (poids) qui représente le poids d'entrée
observe.common.LightsticksColorDto.type=Couleur de cyalumes
observe.common.LightsticksColorDto.types=Couleurs de cyalumes
observe.common.LightsticksTypeDto.type=Type de cyalumes
=====================================
observe/pom.xml
=====================================
@@ -26,7 +26,7 @@
<parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0.9-SNAPSHOT</version>
+ <version>7.1.0-SNAPSHOT</version>
</parent>
<artifactId>observe</artifactId>
=====================================
persistence/pom.xml
=====================================
@@ -26,7 +26,7 @@
<parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0.9-SNAPSHOT</version>
+ <version>7.1.0-SNAPSHOT</version>
</parent>
<artifactId>persistence</artifactId>
=====================================
persistence/src/main/java/fr/ird/observe/persistence/migration/DataSourceMigrationForVersion_7_1.java
=====================================
@@ -0,0 +1,50 @@
+package fr.ird.observe.persistence.migration;
+
+/*-
+ * #%L
+ * ObServe :: Persistence
+ * %%
+ * Copyright (C) 2008 - 2019 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%
+ */
+
+import com.google.auto.service.AutoService;
+import org.nuiton.topia.service.migration.resources.MigrationVersionResource;
+import org.nuiton.topia.service.migration.resources.MigrationVersionResourceExecutor;
+import org.nuiton.version.Versions;
+
+/**
+ * Created on 16/07/19.
+ *
+ * @author Tony Chemit - dev(a)tchemit.fr
+ * @since ?
+ */
+(a)AutoService(MigrationVersionResource.class)
+public class DataSourceMigrationForVersion_7_1 extends MigrationVersionResource {
+
+ public DataSourceMigrationForVersion_7_1() {
+ super(Versions.valueOf("7.1"));
+ }
+
+ @Override
+ public void generateSqlScript(MigrationVersionResourceExecutor executor) {
+ executor.addScript("01", "add_not_null_on_length_weight_parameters");
+ executor.addScript("02", "add_not_null_on_length_length_parameters");
+ }
+
+}
+
=====================================
persistence/src/main/models/Observe.model
=====================================
@@ -416,19 +416,19 @@ label8 + {*:1} String
getLabel(referentialLocale !fr.ird.observe.dto.referential.ReferentialLocale) String
referentiel.LengthLengthParameter > referentiel.FormulaSupport | entity
-inputOutputFormula + {*:1} String
-outputInputFormula + {*:1} String
-inputSizeMeasureType {*:1} referentiel.SizeMeasureType | lazy=false
-outputSizeMeasureType {*:1} referentiel.SizeMeasureType | lazy=false
+inputOutputFormula + {*:1} String | notNull
+outputInputFormula + {*:1} String | notNull
+inputSizeMeasureType {*:1} referentiel.SizeMeasureType | lazy=false notNull
+outputSizeMeasureType {*:1} referentiel.SizeMeasureType | lazy=false notNull
abstract referentiel.LengthWeightAble
referentiel.LengthWeightParameter > referentiel.FormulaSupport | entity
-lengthWeightFormula + {*:1} String
-weightLengthFormula + {*:1} String
+lengthWeightFormula + {*:1} String | notNull
+weightLengthFormula + {*:1} String | notNull
meanLength + {*:1} Float
meanWeight + {*:1} Float
-sizeMeasureType {*:0..1} referentiel.SizeMeasureType | lazy=false
+sizeMeasureType {*:0..1} referentiel.SizeMeasureType | lazy=false notNull
abstract referentiel.ObserveReferentialEntity > ObserveEntity >> fr.ird.observe.dto.reference.ReferentialDtoReferenceAware | entity
code + {*:1} String
=====================================
persistence/src/main/resources/db/migration/7.1/01_add_not_null_on_length_weight_parameters-common.sql
=====================================
@@ -0,0 +1,35 @@
+---
+-- #%L
+-- ObServe :: Persistence
+-- %%
+-- Copyright (C) 2008 - 2019 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%
+---
+DELETE FROM observe_common.LengthWeightParameter WHERE topiaId = 'fr.ird.observe.entities.referentiel.LengthWeightParameter#201008191245#0.299';
+DELETE FROM observe_common.LengthWeightParameter WHERE topiaId = 'fr.ird.observe.entities.referentiel.LengthWeightParameter#201008191245#0.158';
+DELETE FROM observe_common.LengthWeightParameter WHERE topiaId = 'fr.ird.observe.entities.referentiel.LengthWeightParameter#201008191245#0.157';
+DELETE FROM observe_common.LengthWeightParameter WHERE topiaId = 'fr.ird.observe.entities.referentiel.LengthWeightParameter#201008191245#0.298';
+UPDATE observe_common.LengthWeightParameter SET sizeMeasureType = 'fr.ird.observe.entities.referentiel.SizeMeasureType#1433499465700#0.0902433863375336' WHERE sizeMeasureType IS NULL;
+UPDATE observe_common.LengthWeightParameter SET coefficients = 'a=0.5:b=0.0' WHERE coefficients IS NULL;
+
+ALTER TABLE observe_common.LengthWeightParameter ALTER COLUMN sizeMeasureType SET NOT NULL;
+ALTER TABLE observe_common.LengthWeightParameter ALTER COLUMN lengthWeightFormula SET NOT NULL;
+ALTER TABLE observe_common.LengthWeightParameter ALTER COLUMN weightLengthFormula SET NOT NULL;
+ALTER TABLE observe_common.LengthWeightParameter ALTER COLUMN coefficients SET NOT NULL;
+ALTER TABLE observe_common.LengthWeightParameter ALTER COLUMN ocean SET NOT NULL;
+ALTER TABLE observe_common.LengthWeightParameter ALTER COLUMN sex SET NOT NULL;
+ALTER TABLE observe_common.LengthWeightParameter ALTER COLUMN species SET NOT NULL;
=====================================
persistence/src/main/resources/db/migration/7.1/02_add_not_null_on_length_length_parameters-common.sql
=====================================
@@ -0,0 +1,30 @@
+---
+-- #%L
+-- ObServe :: Persistence
+-- %%
+-- Copyright (C) 2008 - 2019 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%
+---
+
+ALTER TABLE observe_common.LengthLengthParameter ALTER COLUMN inputOutputFormula SET NOT NULL;
+ALTER TABLE observe_common.LengthLengthParameter ALTER COLUMN outputInputFormula SET NOT NULL;
+ALTER TABLE observe_common.LengthLengthParameter ALTER COLUMN inputSizeMeasureType SET NOT NULL;
+ALTER TABLE observe_common.LengthLengthParameter ALTER COLUMN outputSizeMeasureType SET NOT NULL;
+ALTER TABLE observe_common.LengthLengthParameter ALTER COLUMN coefficients SET NOT NULL;
+ALTER TABLE observe_common.LengthLengthParameter ALTER COLUMN species SET NOT NULL;
+ALTER TABLE observe_common.LengthLengthParameter ALTER COLUMN ocean SET NOT NULL;
+ALTER TABLE observe_common.LengthLengthParameter ALTER COLUMN sex SET NOT NULL;
=====================================
pom.xml
=====================================
@@ -31,7 +31,7 @@
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0.9-SNAPSHOT</version>
+ <version>7.1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>ObServe :: Pom</name>
@@ -149,7 +149,7 @@
<devMode>true</devMode>
<!--persistence model version-->
- <observe.model.version>7.0</observe.model.version>
+ <observe.model.version>7.1</observe.model.version>
<!-- build timestamp configuration -->
<maven.build.timestamp.format>dd/MM/yyyy HH:mm z</maven.build.timestamp.format>
=====================================
server-configuration/pom.xml
=====================================
@@ -26,7 +26,7 @@
<parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0.9-SNAPSHOT</version>
+ <version>7.1.0-SNAPSHOT</version>
</parent>
<artifactId>server-configuration</artifactId>
=====================================
server-core/pom.xml
=====================================
@@ -27,7 +27,7 @@
<parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0.9-SNAPSHOT</version>
+ <version>7.1.0-SNAPSHOT</version>
</parent>
<artifactId>server-core</artifactId>
=====================================
server-runner/pom.xml
=====================================
@@ -27,7 +27,7 @@
<parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0.9-SNAPSHOT</version>
+ <version>7.1.0-SNAPSHOT</version>
</parent>
<artifactId>server-runner</artifactId>
=====================================
services-client/pom.xml
=====================================
@@ -27,7 +27,7 @@
<parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0.9-SNAPSHOT</version>
+ <version>7.1.0-SNAPSHOT</version>
</parent>
<artifactId>services-client</artifactId>
=====================================
services-local/pom.xml
=====================================
@@ -27,7 +27,7 @@
<parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0.9-SNAPSHOT</version>
+ <version>7.1.0-SNAPSHOT</version>
</parent>
<artifactId>services-local</artifactId>
=====================================
services-local/src/main/java/fr/ird/observe/services/local/service/actions/consolidate/ConsolidateDataServiceLocal.java
=====================================
@@ -665,6 +665,12 @@ public class ConsolidateDataServiceLocal extends ObserveServiceLocal implements
log.error(String.format("No size measure type found for TargetLength (%s) will use the one of the species", lengthWeightComputable.getTopiaId()));
inputSizeMeasureType = species.getSizeMeasureType();
}
+
+ if (inputSizeMeasureType == null) {
+ log.error(String.format("No size measure type found for Species (%s), can't continue!", species.getTopiaId()));
+ return;
+ }
+
Optional<LengthWeightParameter> optionalLengthWeightParameter = activityContext.findLengthWeightParameter(species, sex, inputSizeMeasureType);
if (!optionalLengthWeightParameter.isPresent()) {
=====================================
services-local/src/test/java/fr/ird/observe/services/local/entity/LengthWeightParemetersTest.java
=====================================
@@ -31,14 +31,16 @@ import fr.ird.observe.entities.referentiel.Ocean;
import fr.ird.observe.entities.referentiel.OceanTopiaDao;
import fr.ird.observe.entities.referentiel.Sex;
import fr.ird.observe.entities.referentiel.SexTopiaDao;
+import fr.ird.observe.entities.referentiel.SizeMeasureType;
+import fr.ird.observe.entities.referentiel.SizeMeasureTypeTopiaDao;
import fr.ird.observe.entities.referentiel.Species;
import fr.ird.observe.entities.referentiel.SpeciesTopiaDao;
import fr.ird.observe.persistence.ObserveTopiaDaoSupplier;
import fr.ird.observe.persistence.ObserveTopiaPersistenceContext;
import fr.ird.observe.services.local.service.ServiceLocalTestSupport;
import fr.ird.observe.test.spi.CopyDatabaseConfiguration;
-import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
@@ -64,6 +66,7 @@ public class LengthWeightParemetersTest extends ServiceLocalTestSupport {
Species species,
Ocean ocean,
Sex sex,
+ SizeMeasureType sizeMeasureType,
Date startDate,
Date endDate) {
@@ -72,6 +75,7 @@ public class LengthWeightParemetersTest extends ServiceLocalTestSupport {
entity.setSpecies(species);
entity.setSex(sex);
entity.setOcean(ocean);
+ entity.setSizeMeasureType(sizeMeasureType);
entity.setStartDate(startDate);
entity.setEndDate(endDate);
entity.setStatus(ReferenceStatus.enabled);
@@ -92,6 +96,7 @@ public class LengthWeightParemetersTest extends ServiceLocalTestSupport {
SpeciesTopiaDao speciesDAO = persistenceContext.getSpeciesDao();
OceanTopiaDao oceanDAO = persistenceContext.getOceanDao();
SexTopiaDao sexDao = persistenceContext.getSexDao();
+ SizeMeasureTypeTopiaDao sizeMeasureTypeDao = persistenceContext.getSizeMeasureTypeDao();
Optional<Species> optionalSpecies = Optional.ofNullable(speciesDAO.forFaoCodeEquals("ALB").tryFindUnique().orNull());
Assert.assertTrue("Could not find species with faoCode: DOL", optionalSpecies.isPresent());
@@ -105,6 +110,10 @@ public class LengthWeightParemetersTest extends ServiceLocalTestSupport {
Optional<Sex> optionalFemaleSex = Optional.ofNullable(sexDao.forCodeEquals("2").tryFindUnique().orNull());
Assert.assertTrue("Could not find sex with code 2 (female)", optionalFemaleSex.isPresent());
+ Optional<SizeMeasureType> optionalSizeMeasureType = Optional.ofNullable(sizeMeasureTypeDao.forCodeEquals("FL").tryFindUnique().orNull());
+ Assert.assertTrue("Could not find sizeMeasureType with code FL", optionalSizeMeasureType.isPresent());
+ SizeMeasureType sizeMeasureType = optionalSizeMeasureType.get();
+
Date firstStartDate = DateUtil.createDate(1, 1, 2010);
Date firstEndDate = DateUtil.createDate(31, 12, 2010);
Date secondStartDate = DateUtil.createDate(1, 1, 2011);
@@ -123,13 +132,13 @@ public class LengthWeightParemetersTest extends ServiceLocalTestSupport {
Ocean indianOcean = optionalIndianOcean.orElse(null);
// Ajout parametrage Male / Atlantique (2010)
- createLengthWeightParameter(lengthWeightParameterDao, species, atlanticOcean, maleSex, firstStartDate, firstEndDate);
+ createLengthWeightParameter(lengthWeightParameterDao, species, atlanticOcean, maleSex, sizeMeasureType,firstStartDate, firstEndDate);
// Ajout parametrage Male / Atlantique (après 2010)
- createLengthWeightParameter(lengthWeightParameterDao, species, atlanticOcean, maleSex, secondStartDate, null);
+ createLengthWeightParameter(lengthWeightParameterDao, species, atlanticOcean, maleSex, sizeMeasureType,secondStartDate, null);
// Ajout parametrage Male / Indien (2010)
- createLengthWeightParameter(lengthWeightParameterDao, species, indianOcean, maleSex, firstStartDate, firstEndDate);
+ createLengthWeightParameter(lengthWeightParameterDao, species, indianOcean, maleSex, sizeMeasureType,firstStartDate, firstEndDate);
// Ajout parametrage Male / Indien (Après 2010)
- createLengthWeightParameter(lengthWeightParameterDao, species, indianOcean, maleSex, secondStartDate, null);
+ createLengthWeightParameter(lengthWeightParameterDao, species, indianOcean, maleSex, sizeMeasureType,secondStartDate, null);
}
@@ -149,6 +158,7 @@ public class LengthWeightParemetersTest extends ServiceLocalTestSupport {
SpeciesTopiaDao speciesDAO = persistenceContext.getSpeciesDao();
OceanTopiaDao oceanDAO = persistenceContext.getOceanDao();
SexTopiaDao sexDao = persistenceContext.getSexDao();
+ SizeMeasureTypeTopiaDao sizeMeasureTypeDao = persistenceContext.getSizeMeasureTypeDao();
Optional<Species> optionalSpecies = Optional.ofNullable(speciesDAO.forFaoCodeEquals("ALB").tryFindUnique().orNull());
Assert.assertTrue("Could not find species with faoCode: DOL", optionalSpecies.isPresent());
@@ -184,47 +194,52 @@ public class LengthWeightParemetersTest extends ServiceLocalTestSupport {
Ocean indianOcean = optionalIndianOcean.orElse(null);
Ocean pacificOcean = optionalPacificOcean.orElse(null);
- assertFoundLengthWeightParameter(persistenceContext, species, atlanticOcean, null, undeterminedSex, date2009, date1970);
- assertFoundLengthWeightParameter(persistenceContext, species, atlanticOcean, undeterminedSex, undeterminedSex, date2009, date1970);
- assertFoundLengthWeightParameter(persistenceContext, species, atlanticOcean, maleSex, undeterminedSex, date2009, date1970);
- assertFoundLengthWeightParameter(persistenceContext, species, atlanticOcean, femaleSex, undeterminedSex, date2009, date1970);
- assertFoundLengthWeightParameter(persistenceContext, species, atlanticOcean, null, undeterminedSex, date2010, date1970);
- assertFoundLengthWeightParameter(persistenceContext, species, atlanticOcean, undeterminedSex, undeterminedSex, date2010, date1970);
- assertFoundLengthWeightParameter(persistenceContext, species, atlanticOcean, maleSex, maleSex, date2010, date2010);
- assertFoundLengthWeightParameter(persistenceContext, species, atlanticOcean, femaleSex, undeterminedSex, date2010, date1970);
+ Optional<SizeMeasureType> optionalSizeMeasureType = Optional.ofNullable(sizeMeasureTypeDao.forCodeEquals("FL").tryFindUnique().orNull());
+ Assert.assertTrue("Could not find sizeMeasureType with code FL", optionalSizeMeasureType.isPresent());
+ SizeMeasureType sizeMeasureType = optionalSizeMeasureType.get();
+
+ assertFoundLengthWeightParameter(persistenceContext, species, atlanticOcean, null, undeterminedSex, date2009, date1970,sizeMeasureType);
+ assertFoundLengthWeightParameter(persistenceContext, species, atlanticOcean, undeterminedSex, undeterminedSex, date2009, date1970,sizeMeasureType);
+ assertFoundLengthWeightParameter(persistenceContext, species, atlanticOcean, maleSex, undeterminedSex, date2009, date1970,sizeMeasureType);
+ assertFoundLengthWeightParameter(persistenceContext, species, atlanticOcean, femaleSex, undeterminedSex, date2009, date1970,sizeMeasureType);
+
+ assertFoundLengthWeightParameter(persistenceContext, species, atlanticOcean, null, undeterminedSex, date2010, date1970,sizeMeasureType);
+ assertFoundLengthWeightParameter(persistenceContext, species, atlanticOcean, undeterminedSex, undeterminedSex, date2010, date1970,sizeMeasureType);
+ assertFoundLengthWeightParameter(persistenceContext, species, atlanticOcean, maleSex, maleSex, date2010, date2010,sizeMeasureType);
+ assertFoundLengthWeightParameter(persistenceContext, species, atlanticOcean, femaleSex, undeterminedSex, date2010, date1970,sizeMeasureType);
- assertFoundLengthWeightParameter(persistenceContext, species, atlanticOcean, null, undeterminedSex, date2011, date1970);
- assertFoundLengthWeightParameter(persistenceContext, species, atlanticOcean, undeterminedSex, undeterminedSex, date2011, date1970);
- assertFoundLengthWeightParameter(persistenceContext, species, atlanticOcean, maleSex, maleSex, date2011, date2011);
- assertFoundLengthWeightParameter(persistenceContext, species, atlanticOcean, femaleSex, undeterminedSex, date2011, date1970);
+ assertFoundLengthWeightParameter(persistenceContext, species, atlanticOcean, null, undeterminedSex, date2011, date1970,sizeMeasureType);
+ assertFoundLengthWeightParameter(persistenceContext, species, atlanticOcean, undeterminedSex, undeterminedSex, date2011, date1970,sizeMeasureType);
+ assertFoundLengthWeightParameter(persistenceContext, species, atlanticOcean, maleSex, maleSex, date2011, date2011,sizeMeasureType);
+ assertFoundLengthWeightParameter(persistenceContext, species, atlanticOcean, femaleSex, undeterminedSex, date2011, date1970,sizeMeasureType);
// this test is now working!!! since we manage now perfectly null-null date range
- assertFoundLengthWeightParameter(persistenceContext, species, indianOcean, undeterminedSex, undeterminedSex, date2009, null);
- assertFoundLengthWeightParameter(persistenceContext, species, indianOcean, undeterminedSex, undeterminedSex, date2009, null);
- assertFoundLengthWeightParameter(persistenceContext, species, indianOcean, maleSex, undeterminedSex, date2009, null);
- assertFoundLengthWeightParameter(persistenceContext, species, indianOcean, femaleSex, undeterminedSex, date2009, null);
+ assertFoundLengthWeightParameter(persistenceContext, species, indianOcean, undeterminedSex, undeterminedSex, date2009, null,sizeMeasureType);
+ assertFoundLengthWeightParameter(persistenceContext, species, indianOcean, undeterminedSex, undeterminedSex, date2009, null,sizeMeasureType);
+ assertFoundLengthWeightParameter(persistenceContext, species, indianOcean, maleSex, undeterminedSex, date2009, null,sizeMeasureType);
+ assertFoundLengthWeightParameter(persistenceContext, species, indianOcean, femaleSex, undeterminedSex, date2009, null,sizeMeasureType);
- assertFoundLengthWeightParameter(persistenceContext, species, indianOcean, undeterminedSex, undeterminedSex, date2010, null);
- assertFoundLengthWeightParameter(persistenceContext, species, indianOcean, maleSex, maleSex, date2010, date2010);
- assertFoundLengthWeightParameter(persistenceContext, species, indianOcean, femaleSex, undeterminedSex, date2010, null);
+ assertFoundLengthWeightParameter(persistenceContext, species, indianOcean, undeterminedSex, undeterminedSex, date2010, null,sizeMeasureType);
+ assertFoundLengthWeightParameter(persistenceContext, species, indianOcean, maleSex, maleSex, date2010, date2010,sizeMeasureType);
+ assertFoundLengthWeightParameter(persistenceContext, species, indianOcean, femaleSex, undeterminedSex, date2010, null,sizeMeasureType);
- assertFoundLengthWeightParameter(persistenceContext, species, indianOcean, undeterminedSex, undeterminedSex, date2011, null);
- assertFoundLengthWeightParameter(persistenceContext, species, indianOcean, maleSex, maleSex, date2011, date2011);
- assertFoundLengthWeightParameter(persistenceContext, species, indianOcean, femaleSex, undeterminedSex, date2011, null);
+ assertFoundLengthWeightParameter(persistenceContext, species, indianOcean, undeterminedSex, undeterminedSex, date2011, null,sizeMeasureType);
+ assertFoundLengthWeightParameter(persistenceContext, species, indianOcean, maleSex, maleSex, date2011, date2011,sizeMeasureType);
+ assertFoundLengthWeightParameter(persistenceContext, species, indianOcean, femaleSex, undeterminedSex, date2011, null,sizeMeasureType);
- assertNotFoundLengthWeightParameter(persistenceContext, species, pacificOcean, undeterminedSex, date2010);
- assertNotFoundLengthWeightParameter(persistenceContext, species, pacificOcean, maleSex, date2010);
- assertNotFoundLengthWeightParameter(persistenceContext, species, pacificOcean, femaleSex, date2010);
+ assertNotFoundLengthWeightParameter(persistenceContext, species, pacificOcean, undeterminedSex, date2010,sizeMeasureType);
+ assertNotFoundLengthWeightParameter(persistenceContext, species, pacificOcean, maleSex, date2010,sizeMeasureType);
+ assertNotFoundLengthWeightParameter(persistenceContext, species, pacificOcean, femaleSex, date2010,sizeMeasureType);
}
- protected void assertFoundLengthWeightParameter(ObserveTopiaDaoSupplier supplier, Species species, Ocean ocean, Sex sex, Sex expectedSex, Date date, Date expectedStartDate) {
+ protected void assertFoundLengthWeightParameter(ObserveTopiaDaoSupplier supplier, Species species, Ocean ocean, Sex sex, Sex expectedSex, Date date, Date expectedStartDate,SizeMeasureType expectedSizeMeasureType) {
if (log.isInfoEnabled()) {
log.info("Try to find length weith parameter for species " + species.getFaoCode() + " - ocean " + ocean.getLabel1() + " - sex " + (sex == null ? "null" : sex.getLabel1()) + " at " + date);
}
- LengthWeightParameter lengthWeightParameter = LengthWeightParameters.findLengthWeightParameter(supplier, species, sex, ocean, date, null);
+ LengthWeightParameter lengthWeightParameter = LengthWeightParameters.findLengthWeightParameter(supplier, species, sex, ocean, date, expectedSizeMeasureType);
Assert.assertNotNull("length weith parameter not found for species " + species.getFaoCode() + " - ocean " + ocean.getLabel1() + " - sex " + (sex == null ? "null" : sex.getLabel1()) + " at " + date, lengthWeightParameter);
Assert.assertEquals("Expected sex is " + expectedSex.getLabel1() + " but the one found was " + lengthWeightParameter.getSex().getLabel1(), expectedSex, lengthWeightParameter.getSex());
@@ -234,13 +249,13 @@ public class LengthWeightParemetersTest extends ServiceLocalTestSupport {
}
}
- protected void assertNotFoundLengthWeightParameter(ObserveTopiaDaoSupplier supplier, Species species, Ocean ocean, Sex sex, Date date) {
+ protected void assertNotFoundLengthWeightParameter(ObserveTopiaDaoSupplier supplier, Species species, Ocean ocean, Sex sex, Date date,SizeMeasureType expectedSizeMeasureType) {
if (log.isInfoEnabled()) {
log.info("Try to find length weith parameter for species " + species.getFaoCode() + " - ocean " + ocean.getLabel1() + " - sex " + (sex == null ? "null" : sex.getLabel1()) + " at " + date);
}
try {
- LengthWeightParameters.findLengthWeightParameter(supplier, species, sex, ocean, date, null);
+ LengthWeightParameters.findLengthWeightParameter(supplier, species, sex, ocean, date, expectedSizeMeasureType);
Assert.fail();
} catch (LengthWeightParameterNotFoundException e) {
=====================================
services-local/src/test/java/fr/ird/observe/services/local/service/actions/validate/ValidateServiceLocalTest.java
=====================================
@@ -178,7 +178,7 @@ public class ValidateServiceLocalTest extends ServiceLocalTestSupport {
assertValidateResult(result, SexDto.class, 2);
assertValidateResult(result, SensorBrandDto.class, 1);
assertValidateResult(result, LightsticksColorDto.class, 2);
- assertValidateResult(result, LengthWeightParameterDto.class, 4);
+ assertValidateResult(result, LengthWeightParameterDto.class, 3);
assertValidateResult(result, LengthLengthParameterDto.class, 0);
assertValidateResult(result, GearCaracteristicTypeDto.class, 2);
assertValidateResult(result, ObjectOperationDto.class, 2);
=====================================
services/pom.xml
=====================================
@@ -27,7 +27,7 @@
<parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0.9-SNAPSHOT</version>
+ <version>7.1.0-SNAPSHOT</version>
</parent>
<artifactId>services</artifactId>
=====================================
test/pom.xml
=====================================
@@ -26,7 +26,7 @@
<parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0.9-SNAPSHOT</version>
+ <version>7.1.0-SNAPSHOT</version>
</parent>
<artifactId>test</artifactId>
=====================================
test/src/main/java/fr/ird/observe/test/ObserveFixtures.java
=====================================
@@ -253,7 +253,7 @@ public class ObserveFixtures {
.put("observe_common.harbour", 74L)
.put("observe_common.lastupdatedate", 104L)
.put("observe_common.lengthlengthparameter", 0L)
- .put("observe_common.lengthweightparameter", 365L)
+ .put("observe_common.lengthweightparameter", 361L)
.put("observe_common.ocean", 3L)
.put("observe_common.ocean_species", 500L)
.put("observe_common.organism", 9L)
=====================================
test/src/main/resources/db/7.1/dataForTestLongline.sql.gz
=====================================
Binary files /dev/null and b/test/src/main/resources/db/7.1/dataForTestLongline.sql.gz differ
=====================================
test/src/main/resources/db/7.1/dataForTestSeine.sql.gz
=====================================
Binary files /dev/null and b/test/src/main/resources/db/7.1/dataForTestSeine.sql.gz differ
=====================================
test/src/main/resources/db/7.1/empty_h2.sql.gz
=====================================
Binary files /dev/null and b/test/src/main/resources/db/7.1/empty_h2.sql.gz differ
=====================================
test/src/main/resources/db/7.1/empty_pg.sql.gz
=====================================
Binary files /dev/null and b/test/src/main/resources/db/7.1/empty_pg.sql.gz differ
=====================================
test/src/main/resources/db/7.1/referentiel.sql.gz
=====================================
Binary files /dev/null and b/test/src/main/resources/db/7.1/referentiel.sql.gz differ
=====================================
validation/pom.xml
=====================================
@@ -26,7 +26,7 @@
<parent>
<groupId>fr.ird.observe</groupId>
<artifactId>ird-observe</artifactId>
- <version>7.0.9-SNAPSHOT</version>
+ <version>7.1.0-SNAPSHOT</version>
</parent>
<artifactId>validation</artifactId>
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/cb723884522d89fc9414d96c57…
--
View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/cb723884522d89fc9414d96c57…
You're receiving this email because of your account on gitlab.com.
1
0