From 2f7fcc520814a4cc744fdff8f9b9cb1e97adfd12 Mon Sep 17 00:00:00 2001 From: y72wvh Date: Mon, 16 Oct 2023 17:31:59 +0200 Subject: [PATCH 1/2] fix: nb orders in database --- pom.xml | 2 +- .../metadata/domain/Survey.java | 4 ++++ .../util/Dataloader.java | 16 +++++++++------- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/pom.xml b/pom.xml index 1cde8e92..535dded1 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ fr.insee.survey platine-management - 1.0.24 + 1.0.25-rc platine-management REST API for communication between DB and Platine-Management UI and Platine-My-Surveys UI diff --git a/src/main/java/fr/insee/survey/datacollectionmanagement/metadata/domain/Survey.java b/src/main/java/fr/insee/survey/datacollectionmanagement/metadata/domain/Survey.java index 1f507af0..63c0d8ca 100644 --- a/src/main/java/fr/insee/survey/datacollectionmanagement/metadata/domain/Survey.java +++ b/src/main/java/fr/insee/survey/datacollectionmanagement/metadata/domain/Survey.java @@ -33,9 +33,13 @@ public class Survey { @NonNull private Integer year; private Integer sampleSize; + @Column(length = 2000) private String longWording; + @Column(length = 2000) private String shortWording; + @Column(length = 2000) private String shortObjectives; + @Column(length = 2000) private String longObjectives; private String visaNumber; private String cnisUrl; diff --git a/src/main/java/fr/insee/survey/datacollectionmanagement/util/Dataloader.java b/src/main/java/fr/insee/survey/datacollectionmanagement/util/Dataloader.java index 84b16172..ac0910b9 100644 --- a/src/main/java/fr/insee/survey/datacollectionmanagement/util/Dataloader.java +++ b/src/main/java/fr/insee/survey/datacollectionmanagement/util/Dataloader.java @@ -236,19 +236,21 @@ private void initOrder() { Long nbExistingOrders = orderRepository.count(); LOGGER.info("{} orders in database", nbExistingOrders); - if (nbExistingOrders == 0) { + if (nbExistingOrders !=9 ) { // Creating table order LOGGER.info("loading eventorder data"); orderRepository - .saveAndFlush(new EventOrder(Long.parseLong("8"), TypeQuestioningEvent.REFUSAL.toString(), 8)); + .saveAndFlush(new EventOrder(Long.parseLong("8"), TypeQuestioningEvent.REFUSAL.toString(), 9)); orderRepository - .saveAndFlush(new EventOrder(Long.parseLong("7"), TypeQuestioningEvent.VALINT.toString(), 7)); + .saveAndFlush(new EventOrder(Long.parseLong("7"), TypeQuestioningEvent.VALINT.toString(), 8)); orderRepository - .saveAndFlush(new EventOrder(Long.parseLong("6"), TypeQuestioningEvent.VALPAP.toString(), 6)); - orderRepository.saveAndFlush(new EventOrder(Long.parseLong("5"), TypeQuestioningEvent.HC.toString(), 5)); + .saveAndFlush(new EventOrder(Long.parseLong("6"), TypeQuestioningEvent.VALPAP.toString(), 7)); + orderRepository.saveAndFlush(new EventOrder(Long.parseLong("5"), TypeQuestioningEvent.HC.toString(), 6)); orderRepository - .saveAndFlush(new EventOrder(Long.parseLong("4"), TypeQuestioningEvent.PARTIELINT.toString(), 4)); - orderRepository.saveAndFlush(new EventOrder(Long.parseLong("3"), TypeQuestioningEvent.WASTE.toString(), 3)); + .saveAndFlush(new EventOrder(Long.parseLong("4"), TypeQuestioningEvent.PARTIELINT.toString(), 5)); + orderRepository.saveAndFlush(new EventOrder(Long.parseLong("3"), TypeQuestioningEvent.WASTE.toString(), 4)); + orderRepository.saveAndFlush(new EventOrder(Long.parseLong("3"), TypeQuestioningEvent.FOLLOWUP.toString(), 3)); + orderRepository.saveAndFlush(new EventOrder(Long.parseLong("2"), TypeQuestioningEvent.PND.toString(), 2)); orderRepository .saveAndFlush(new EventOrder(Long.parseLong("1"), TypeQuestioningEvent.INITLA.toString(), 1)); From f4b95ec7ec4d2ace55df8a162003f52920c00039 Mon Sep 17 00:00:00 2001 From: y72wvh Date: Mon, 16 Oct 2023 17:33:42 +0200 Subject: [PATCH 2/2] bump: version 1.0.25 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 535dded1..b26b71f1 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ fr.insee.survey platine-management - 1.0.25-rc + 1.0.25 platine-management REST API for communication between DB and Platine-Management UI and Platine-My-Surveys UI