diff --git a/backend/src/main/resources/db/testdata/V666.11__Insert_dummy_risk_factors.sql b/backend/src/main/resources/db/testdata/V666.11__Insert_dummy_risk_factors.sql index 3071bec9a3..f1f330fa5b 100644 --- a/backend/src/main/resources/db/testdata/V666.11__Insert_dummy_risk_factors.sql +++ b/backend/src/main/resources/db/testdata/V666.11__Insert_dummy_risk_factors.sql @@ -1,5 +1,5 @@ -- /!\ This file is automatically generated by a local script. --- Do NOT update it directly, update the associated .jsonc file in /backend/src/main/resources/db/testdata/json/. +-- Do NOT update it directly, update the associated .jsonc file in /backend/src/main/resources/db/testdata/json/ and execute 'make generate-test-data'. INSERT INTO risk_factors (cfr, control_priority_level, control_rate_risk_factor, departure_datetime_utc, detectability_risk_factor, external_immatriculation, impact_risk_factor, infraction_rate_risk_factor, infraction_score, ircs, last_control_datetime_utc, last_control_infraction, last_logbook_message_datetime_utc, number_controls_last_3_years, number_controls_last_5_years, number_gear_seizures_last_5_years, number_infractions_last_5_years, number_recent_controls, number_species_seizures_last_5_years, number_vessel_seizures_last_5_years, post_control_comments, probability_risk_factor, risk_factor, segment_highest_impact, segment_highest_priority, segments, total_weight_onboard, trip_number, vessel_id, gear_onboard, species_onboard) VALUES ('FAK000999999', 2.56, 3.8, CURRENT_DATE, 3, 'DONTSINK', 2.1, 2.56, NULL, 'CALLME', '2024-03-01 00:00:00', true, CURRENT_DATE, 1, 8, 4, 5, 0, 3, 2, '', 2, 2.473, 'NWW10', 'PEL 03', '{"NWW10", "PEL 03"}', 1235.36, 123101, 1, '[{"gear":"OTB","mesh":70,"dimensions":45}]', '[{"gear":"OTB","faoZone":"27.8.b","species":"BLI","weight":13.46},{"gear":"OTB","faoZone":"27.8.c","species":"HKE","weight":235.6},{"gear":"OTB","faoZone":"27.8.b","species":"HKE","weight":235.6}]'); diff --git a/backend/src/main/resources/db/testdata/V666.19.0__Insert_dummy_reportings.sql b/backend/src/main/resources/db/testdata/V666.19.0__Insert_dummy_reportings.sql deleted file mode 100644 index 8167719ec6..0000000000 --- a/backend/src/main/resources/db/testdata/V666.19.0__Insert_dummy_reportings.sql +++ /dev/null @@ -1,78 +0,0 @@ -TRUNCATE TABLE reportings RESTART IDENTITY CASCADE; -INSERT INTO reportings (type, vessel_name, internal_reference_number, external_reference_number, ircs, - vessel_identifier, flag_state, creation_date, validation_date, archived, deleted, value, latitude, longitude, vessel_id) -VALUES ('ALERT', 'MARIAGE ÎLE HASARD', 'ABC000180832', 'VP374069', 'CG1312', 'INTERNAL_REFERENCE_NUMBER', 'FR', - NOW() - ('1 DAY')::interval, NOW() - ('30 MINUTES')::interval, false, false, ('{' || - '"seaFront": "NAMO",' || - '"riskFactor": 3.5647,' || - '"type": "THREE_MILES_TRAWLING_ALERT",' || - '"natinfCode": 7059' || - '}')::jsonb, 41.569, 37.28, 123456), - ('ALERT', 'MARIAGE ÎLE HASARD', 'ABC000180832', 'VP374069', 'CG1312', 'INTERNAL_REFERENCE_NUMBER', 'FR', - NOW() - ('3 DAY')::interval, NOW() - ('4 DAY')::interval, true, false, ('{' || - '"seaFront": "NAMO",' || - '"riskFactor": 3.3647,' || - '"type": "THREE_MILES_TRAWLING_ALERT",' || - '"natinfCode": 7059' || - '}')::jsonb, null, null, 123456), - ('ALERT', 'MARIAGE ÎLE HASARD', 'ABC000180832', 'VP374069', 'CG1312', 'INTERNAL_REFERENCE_NUMBER', 'FR', - NOW() - ('4 DAY')::interval, NOW() - ('5 DAY')::interval, true, true, ('{' || - '"seaFront": "NAMO",' || - '"riskFactor": 3.6947,' || - '"type": "MISSING_FAR_ALERT",' || - '"natinfCode": 27689' || - '}')::jsonb, -5.569, 71.569, 123456), - ('ALERT', 'PROMETTRE INTÉRIEUR SAINT', 'ABC000232227', 'ZJ472279', 'TMG5756', 'INTERNAL_REFERENCE_NUMBER', 'FR', - NOW() - ('1 DAY')::interval, NOW(), false, false, ('{' || - '"seaFront": "SA",' || - '"riskFactor": 2.647,' || - '"type": "TWELVE_MILES_FISHING_ALERT",' || - '"natinfCode": 2610' || - '}')::jsonb, 1.123, -12.569, null), - ('ALERT', 'HAÏR GAUCHE VIVRE', 'ABC000591595', 'HK498094', 'KF0313', 'INTERNAL_REFERENCE_NUMBER', 'FR', - NOW() - ('2 DAY')::interval, NOW() - ('1 DAY')::interval, false, false, ('{' || - '"seaFront": "MEMN",' || - '"flagState": "FR",' || - '"riskFactor": 1.389,' || - '"type": "MISSING_FAR_ALERT",' || - '"natinfCode": 27689' || - '}')::jsonb, null, null, null), - ('INFRACTION_SUSPICION', 'COURANT MAIN PROFESSEUR', 'ABC000042310', 'IW783219', 'QD0506', - 'INTERNAL_REFERENCE_NUMBER', 'FR', NOW() - ('1 DAY')::interval, NOW() - ('1 DAY')::interval, false, false, ('{' || - '"reportingActor": "OPS",' || - '"controlUnitId": null,' || - '"authorTrigram": "LTH",' || - '"authorContact": "",' || - '"title": "Suspicion de chalutage dans les 3 milles",' || - '"description": "Chalutage dans les 3 milles (vitesse & parcours pêche) le 22/08/22 à 22h56",' || - '"natinfCode": 23588,' || - '"dml": "DML 29",' || - '"type": "INFRACTION_SUSPICION",' || - '"seaFront": "NAMO"' || - '}')::jsonb, null, null, 10), - ('INFRACTION_SUSPICION', 'RENCONTRER VEILLER APPARTEMENT"', 'ABC000597493', 'JL026591', 'CMQ7994', - 'INTERNAL_REFERENCE_NUMBER', 'FR', NOW() - ('1 DAY 1 HOUR')::interval, null, false, - false, ('{' || - '"reportingActor": "UNIT",' || - '"controlUnitId": 10012,' || - '"authorTrigram": "LTH",' || - '"authorContact": "Jean Bon (0600000000)",' || - '"title": "Pêche sans VMS ni JPE",' || - '"description": "Pêche thon rouge sans VMS détecté ni JPE",' || - '"natinfCode": 27689,' || - '"dml": "DML 29",' || - '"type": "INFRACTION_SUSPICION",' || - '"seaFront": "NAMO"' || - '}')::jsonb, null, null, 11), - ('OBSERVATION', 'RENCONTRER VEILLER APPARTEMENT"', 'ABC000597493', 'JL026591', 'CMQ7994', - 'INTERNAL_REFERENCE_NUMBER', 'FR', NOW() - ('1 DAY 1 HOUR')::interval, NOW() - ('1 DAY 1 HOUR')::interval, false, - false, ('{' || - '"reportingActor": "UNIT",' || - '"controlUnitId": 10012,' || - '"authorTrigram": "",' || - '"authorContact": "Jean Bon (0600000000)",' || - '"title": "OBSERVATION: Pêche sans VMS ni JPE",' || - '"description": "OBSERVATION: Pêche thon rouge sans VMS détecté ni JPE",' || - '"type": "OBSERVATION",' || - '"seaFront": "NAMO"' || - '}')::jsonb, null, null, 11); diff --git a/backend/src/main/resources/db/testdata/V666.19.1__Insert_more_dummy_reportings.sql b/backend/src/main/resources/db/testdata/V666.19.1__Insert_more_dummy_reportings.sql deleted file mode 100644 index d6aa1c4f17..0000000000 --- a/backend/src/main/resources/db/testdata/V666.19.1__Insert_more_dummy_reportings.sql +++ /dev/null @@ -1,12 +0,0 @@ --- /!\ This file is automatically generated by a local script. --- Do NOT update it directly, update the associated .jsonc file in /backend/src/main/resources/db/testdata/json/. - -INSERT INTO reportings (id, archived, creation_date, deleted, external_reference_number, flag_state, internal_reference_number, ircs, latitude, longitude, type, validation_date, value, vessel_id, vessel_identifier, vessel_name) VALUES (9, false, NOW() AT TIME ZONE 'UTC' - INTERVAL '10 days', false, 'EXTIMM101', 'FR', 'CFR101', 'IRCS101', NULL, NULL, 'INFRACTION_SUSPICION', NULL, '{"authorContact":"Jean Bon (0623456789)","authorTrigram":"LTH","controlUnitId":10012,"description":"Une description d''infraction.","dml":"DML 29","natinfCode":27689,"reportingActor":"OPS","seaFront":"NAMO","title":"Suspicion d''infraction 9","type":"INFRACTION_SUSPICION"}', 101, 'INTERNAL_REFERENCE_NUMBER', 'VIVA ESPANA'); - -INSERT INTO reportings (id, archived, creation_date, deleted, external_reference_number, flag_state, internal_reference_number, ircs, latitude, longitude, type, validation_date, value, vessel_id, vessel_identifier, vessel_name) VALUES (10, false, NOW() AT TIME ZONE 'UTC' - INTERVAL '15 days', false, 'EXTIMM101', 'FR', 'CFR101', 'IRCS101', NULL, NULL, 'INFRACTION_SUSPICION', NULL, '{"authorContact":"Jean Bon (0623456789)","authorTrigram":"LTH","controlUnitId":10012,"description":"Une description d''infraction.","dml":"DML 29","natinfCode":27689,"reportingActor":"OPS","seaFront":"NAMO","title":"Suspicion d''infraction 10","type":"INFRACTION_SUSPICION"}', 101, 'INTERNAL_REFERENCE_NUMBER', 'VIVA ESPANA'); - -INSERT INTO reportings (id, archived, creation_date, deleted, external_reference_number, flag_state, internal_reference_number, ircs, latitude, longitude, type, validation_date, value, vessel_id, vessel_identifier, vessel_name) VALUES (11, false, NOW() AT TIME ZONE 'UTC' - INTERVAL '20 days', false, 'EXTIMM115', 'FR', 'CFR115', 'IRCS115', NULL, NULL, 'INFRACTION_SUSPICION', NULL, '{"authorContact":"Jean Bon (0623456789)","authorTrigram":"LTH","controlUnitId":10012,"description":"Une description d''infraction.","dml":"DML 29","natinfCode":27689,"reportingActor":"OPS","seaFront":"NAMO","title":"Suspicion d''infraction 11","type":"INFRACTION_SUSPICION"}', 115, 'INTERNAL_REFERENCE_NUMBER', 'DOS FIN'); - -INSERT INTO reportings (id, archived, creation_date, deleted, external_reference_number, flag_state, internal_reference_number, ircs, latitude, longitude, type, validation_date, value, vessel_id, vessel_identifier, vessel_name) VALUES (12, false, NOW() AT TIME ZONE 'UTC' - INTERVAL '25 days', false, 'EXTIMM115', 'FR', 'CFR115', 'IRCS115', NULL, NULL, 'INFRACTION_SUSPICION', NULL, '{"authorContact":"Jean Bon (0623456789)","authorTrigram":"LTH","controlUnitId":10012,"description":"Une description d''infraction.","dml":"DML 29","natinfCode":27689,"reportingActor":"OPS","seaFront":"NAMO","title":"Suspicion d''infraction 212","type":"INFRACTION_SUSPICION"}', 115, 'INTERNAL_REFERENCE_NUMBER', 'DOS FIN'); - -SELECT setval('reportings_id_seq', (SELECT MAX(id) FROM reportings)); \ No newline at end of file diff --git a/backend/src/main/resources/db/testdata/V666.19__Insert_dummy_reportings.sql b/backend/src/main/resources/db/testdata/V666.19__Insert_dummy_reportings.sql new file mode 100644 index 0000000000..8fcca7b882 --- /dev/null +++ b/backend/src/main/resources/db/testdata/V666.19__Insert_dummy_reportings.sql @@ -0,0 +1,29 @@ +-- /!\ This file is automatically generated by a local script. +-- Do NOT update it directly, update the associated .jsonc file in /backend/src/main/resources/db/testdata/json/ and execute 'make generate-test-data'. + +TRUNCATE TABLE reportings RESTART IDENTITY CASCADE; +INSERT INTO reportings (archived, creation_date, deleted, external_reference_number, flag_state, internal_reference_number, ircs, latitude, longitude, type, validation_date, value, vessel_id, vessel_identifier, vessel_name) VALUES (false, NOW() - INTERVAL '1 day', false, 'VP374069', 'FR', 'ABC000180832', 'CG1312', 41.569, 37.28, 'ALERT', NOW() - INTERVAL '30 minutes', '{"seaFront":"NAMO","riskFactor":3.5647,"type":"THREE_MILES_TRAWLING_ALERT","natinfCode":7059}', 123456, 'INTERNAL_REFERENCE_NUMBER', 'MARIAGE ÎLE HASARD'); + +INSERT INTO reportings (archived, creation_date, deleted, external_reference_number, flag_state, internal_reference_number, ircs, latitude, longitude, type, validation_date, value, vessel_id, vessel_identifier, vessel_name) VALUES (true, NOW() - INTERVAL '3 day', false, 'VP374069', 'FR', 'ABC000180832', 'CG1312', NULL, NULL, 'ALERT', NOW() - INTERVAL '4 day', '{"seaFront":"NAMO","riskFactor":3.3647,"type":"THREE_MILES_TRAWLING_ALERT","natinfCode":7059}', 123456, 'INTERNAL_REFERENCE_NUMBER', 'MARIAGE ÎLE HASARD'); + +INSERT INTO reportings (archived, creation_date, deleted, external_reference_number, flag_state, internal_reference_number, ircs, latitude, longitude, type, validation_date, value, vessel_id, vessel_identifier, vessel_name) VALUES (true, NOW() - INTERVAL '4 day', true, 'VP374069', 'FR', 'ABC000180832', 'CG1312', -5.569, 71.569, 'ALERT', NOW() - INTERVAL '5 day', '{"seaFront":"NAMO","riskFactor":3.6947,"type":"MISSING_FAR_ALERT","natinfCode":27689}', 123456, 'INTERNAL_REFERENCE_NUMBER', 'MARIAGE ÎLE HASARD'); + +INSERT INTO reportings (archived, creation_date, deleted, external_reference_number, flag_state, internal_reference_number, ircs, latitude, longitude, type, validation_date, value, vessel_id, vessel_identifier, vessel_name) VALUES (false, NOW() - INTERVAL '1 day', false, 'ZJ472279', 'FR', 'ABC000232227', 'TMG5756', 1.123, -12.569, 'ALERT', NOW(), '{"seaFront":"SA","riskFactor":2.647,"type":"TWELVE_MILES_FISHING_ALERT","natinfCode":2610}', NULL, 'INTERNAL_REFERENCE_NUMBER', 'PROMETTRE INTÉRIEUR SAINT'); + +INSERT INTO reportings (archived, creation_date, deleted, external_reference_number, flag_state, internal_reference_number, ircs, latitude, longitude, type, validation_date, value, vessel_id, vessel_identifier, vessel_name) VALUES (false, NOW() - INTERVAL '2 day', false, 'HK498094', 'FR', 'ABC000591595', 'KF0313', NULL, NULL, 'ALERT', NOW() - INTERVAL '1 day', '{"seaFront":"MEMN","flagState":"FR","riskFactor":1.389,"type":"MISSING_FAR_ALERT","natinfCode":27689}', NULL, 'INTERNAL_REFERENCE_NUMBER', 'HAÏR GAUCHE VIVRE'); + +INSERT INTO reportings (archived, creation_date, deleted, external_reference_number, flag_state, internal_reference_number, ircs, latitude, longitude, type, validation_date, value, vessel_id, vessel_identifier, vessel_name) VALUES (false, NOW() - INTERVAL '1 day', false, 'IW783219', 'FR', 'ABC000042310', 'QD0506', NULL, NULL, 'INFRACTION_SUSPICION', NOW() - INTERVAL '1 day', '{"reportingActor":"OPS","controlUnitId":null,"authorTrigram":"LTH","authorContact":"","title":"Suspicion de chalutage dans les 3 milles","description":"Chalutage dans les 3 milles (vitesse & parcours pêche) le 22/08/22 à 22h56","natinfCode":23588,"dml":"DML 29","type":"INFRACTION_SUSPICION","seaFront":"NAMO"}', 10, 'INTERNAL_REFERENCE_NUMBER', 'COURANT MAIN PROFESSEUR'); + +INSERT INTO reportings (archived, creation_date, deleted, external_reference_number, flag_state, internal_reference_number, ircs, latitude, longitude, type, validation_date, value, vessel_id, vessel_identifier, vessel_name) VALUES (false, NOW() - INTERVAL '1 day 1 hour', false, 'JL026591', 'FR', 'ABC000597493', 'CMQ7994', NULL, NULL, 'INFRACTION_SUSPICION', NULL, '{"reportingActor":"UNIT","controlUnitId":10012,"authorTrigram":"LTH","authorContact":"Jean Bon (0600000000)","title":"Pêche sans VMS ni JPE","description":"Pêche thon rouge sans VMS détecté ni JPE","natinfCode":27689,"dml":"DML 29","type":"INFRACTION_SUSPICION","seaFront":"NAMO"}', 11, 'INTERNAL_REFERENCE_NUMBER', 'RENCONTRER VEILLER APPARTEMENT'); + +INSERT INTO reportings (archived, creation_date, deleted, external_reference_number, flag_state, internal_reference_number, ircs, latitude, longitude, type, validation_date, value, vessel_id, vessel_identifier, vessel_name) VALUES (false, NOW() - INTERVAL '1 day 1 hour', false, 'JL026591', 'FR', 'ABC000597493', 'CMQ7994', NULL, NULL, 'OBSERVATION', NOW() - INTERVAL '1 day 1 hour', '{"reportingActor":"UNIT","controlUnitId":10012,"authorTrigram":"","authorContact":"Jean Bon (0600000000)","title":"OBSERVATION: Pêche sans VMS ni JPE","description":"OBSERVATION: Pêche thon rouge sans VMS détecté ni JPE","type":"OBSERVATION","seaFront":"NAMO"}', 11, 'INTERNAL_REFERENCE_NUMBER', 'RENCONTRER VEILLER APPARTEMENT'); + +INSERT INTO reportings (id, archived, creation_date, deleted, external_reference_number, flag_state, internal_reference_number, ircs, latitude, longitude, type, validation_date, value, vessel_id, vessel_identifier, vessel_name) VALUES (9, false, NOW() AT TIME ZONE 'UTC' - INTERVAL '10 days', false, 'EXTIMM101', 'FR', 'CFR101', 'IRCS101', NULL, NULL, 'INFRACTION_SUSPICION', NULL, '{"authorContact":"Jean Bon (0623456789)","authorTrigram":"LTH","controlUnitId":10012,"description":"Une description d''infraction.","dml":"DML 29","natinfCode":27689,"reportingActor":"OPS","seaFront":"NAMO","title":"Suspicion d''infraction 9","type":"INFRACTION_SUSPICION"}', 101, 'INTERNAL_REFERENCE_NUMBER', 'VIVA ESPANA'); + +INSERT INTO reportings (id, archived, creation_date, deleted, external_reference_number, flag_state, internal_reference_number, ircs, latitude, longitude, type, validation_date, value, vessel_id, vessel_identifier, vessel_name) VALUES (10, false, NOW() AT TIME ZONE 'UTC' - INTERVAL '15 days', false, 'EXTIMM101', 'FR', 'CFR101', 'IRCS101', NULL, NULL, 'INFRACTION_SUSPICION', NULL, '{"authorContact":"Jean Bon (0623456789)","authorTrigram":"LTH","controlUnitId":10012,"description":"Une description d''infraction.","dml":"DML 29","natinfCode":27689,"reportingActor":"OPS","seaFront":"NAMO","title":"Suspicion d''infraction 10","type":"INFRACTION_SUSPICION"}', 101, 'INTERNAL_REFERENCE_NUMBER', 'VIVA ESPANA'); + +INSERT INTO reportings (id, archived, creation_date, deleted, external_reference_number, flag_state, internal_reference_number, ircs, latitude, longitude, type, validation_date, value, vessel_id, vessel_identifier, vessel_name) VALUES (11, false, NOW() AT TIME ZONE 'UTC' - INTERVAL '20 days', false, 'EXTIMM115', 'FR', 'CFR115', 'IRCS115', NULL, NULL, 'INFRACTION_SUSPICION', NULL, '{"authorContact":"Jean Bon (0623456789)","authorTrigram":"LTH","controlUnitId":10012,"description":"Une description d''infraction.","dml":"DML 29","natinfCode":27689,"reportingActor":"OPS","seaFront":"NAMO","title":"Suspicion d''infraction 11","type":"INFRACTION_SUSPICION"}', 115, 'INTERNAL_REFERENCE_NUMBER', 'DOS FIN'); + +INSERT INTO reportings (id, archived, creation_date, deleted, external_reference_number, flag_state, internal_reference_number, ircs, latitude, longitude, type, validation_date, value, vessel_id, vessel_identifier, vessel_name) VALUES (12, false, NOW() AT TIME ZONE 'UTC' - INTERVAL '25 days', false, 'EXTIMM115', 'FR', 'CFR115', 'IRCS115', NULL, NULL, 'INFRACTION_SUSPICION', NULL, '{"authorContact":"Jean Bon (0623456789)","authorTrigram":"LTH","controlUnitId":10012,"description":"Une description d''infraction.","dml":"DML 29","natinfCode":27689,"reportingActor":"OPS","seaFront":"NAMO","title":"Suspicion d''infraction 212","type":"INFRACTION_SUSPICION"}', 115, 'INTERNAL_REFERENCE_NUMBER', 'DOS FIN'); + +SELECT setval('reportings_id_seq', (SELECT MAX(id) FROM reportings)); \ No newline at end of file diff --git a/backend/src/main/resources/db/testdata/V666.2.0__Insert_dummy_vessels.sql b/backend/src/main/resources/db/testdata/V666.2.0__Insert_dummy_vessels.sql deleted file mode 100644 index 885ddcff7b..0000000000 --- a/backend/src/main/resources/db/testdata/V666.2.0__Insert_dummy_vessels.sql +++ /dev/null @@ -1,61 +0,0 @@ -INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, width, length, district, - district_code, gauge, - registry_port, power, vessel_type, sailing_category, sailing_type, - declared_fishing_gears, - nav_licence_expiration_date, operator_name, - operator_phones, operator_email, proprietor_name, proprietor_phones, proprietor_emails, - vessel_emails, vessel_phones, under_charter, has_esacapt, logbook_equipment_status) -VALUES (1, 'FAK000999999', '224103750', 'CALLME', 'DONTSINK', 'PHENOMENE', 'FR', 5.0, 12.89, 'Auray', 'AY', 123, 'LORIENT', 127, - 'Pêche côtière', '3', 'Pêche', ARRAY ['SDN', 'OTM'], CURRENT_DATE, 'LE PELETIER', ARRAY ['+33 6 84 56 32 14'], - 'lepeletier@gmail.com', 'EL MALIK', ARRAY ['+33 6 45 25 14'], ARRAY ['elmalik@gmail.com'], NULL, NULL, false, false, 'Equipé'), - (2, 'U_W0NTFINDME', 'ABC123456', 'QGDF', 'TALK2ME', 'MALOTRU', 'X', 5.0, 12.89, 'Auray', 'AY', 123, 'LORIENT', - 127, 'Pêche côtière', '3', 'Pêche', ARRAY ['SDN', 'OTM'], CURRENT_DATE, 'LE PELETIER', - ARRAY ['+33 6 84 56 32 14'], 'lepeletier@gmail.com', 'EL MALIK', ARRAY ['+33 6 45 25 14'], - ARRAY ['elmalik@gmail.com'], ARRAY ['whatisyouremail@idontknow.anything'], NULL, true, false, 'Equipé'), - (3, 'FR263418260', '224103750', 'IR12A', '08FR65324', 'LE b@TO', 'FR', 6.0, 14, 'Lorient', 'LT', 123, 'BREST', - 237, 'Pêche côtière', '3', 'Pêche', ARRAY ['SDN', 'OTB', 'LNB'], CURRENT_DATE, 'DUPOND', - ARRAY ['+33 6 84 56 32 14'], 'dupond@gmail.com', 'DURAND', ARRAY ['+33 6 45 25 14'], ARRAY ['durand@gmail.com'], - ARRAY ['escogriffe@dgse.spy', 'henri.duflot@dgse.spy'], ARRAY ['0918273645', '+33 6 00 00 00 00'], true, false, 'Equipé'), - (4, '', null, null, '', 'NO NAME', 'FR', 6.0, 14, 'Lorient', 'LT', 123, 'BREST', 237, 'Pêche côtière', '3', - 'Pêche', ARRAY ['SDN', 'OTB', 'LNB'], CURRENT_DATE, 'DUPOND', ARRAY ['+33 6 84 56 32 14'], 'dupond@gmail.com', - 'DURAND', ARRAY ['+33 6 45 25 14'], ARRAY ['durand@gmail.com'], - ARRAY ['escogriffe@dgse.spy', 'henri.duflot@dgse.spy'], ARRAY ['0918273645', '+33 6 00 00 00 00'], false, false, 'Equipé'), - (5, 'SOCR4T3', null, 'SCRT', 'LePhiloFilou', 'SOCRATE', 'FR', 4.0, 19.29, 'Athènes', 'AT', 293, 'ATHENES', 531, - 'Pêche et abricots', '4', 'Pêche', ARRAY ['PTM', 'OTM'], CURRENT_DATE, 'PARTHENON PHISHING', - ARRAY ['+33 6 84 56 32 19'], 'parthenon@phishing.gr', 'ZEUS', ARRAY ['+33 6 45 25 19'], - ARRAY ['zeus@phishing.gr'], ARRAY ['brossetoilesdents@email.diamant'], NULL, true, false, 'Equipé'), - (6, 'ABC000939217', '', 'SC6082', 'RU460262', 'FRAIS AVIS MODE', 'FR', 15.5, 7.6, 'Auray', 'AY', 130, 'LORIENT', 108, - 'Pêche côtière', '3', 'Pêche', ARRAY ['PTM', 'OTM'], CURRENT_DATE, 'DUPOND', ARRAY ['+33 6 84 56 32 14'], - 'dupond@gmail.com', 'DURAND', ARRAY ['+33 6 45 25 14'], ARRAY ['durand@gmail.com'], - ARRAY ['escogriffe@dgse.spy', 'henri.duflot@dgse.spy'], ARRAY ['0918273645', '+33 6 00 00 00 00'], true, false, 'Equipé'), - (7, 'ABC000717263', '', 'QP6933', 'IG860866', 'ÉCRASER TON IMPOSSIBLE', 'FR', 15.5, 7.6, 'Auray', 'AY', 123, - 'LORIENT', 108, 'Pêche côtière', '3', 'Pêche', ARRAY ['PTM', 'OTM'], CURRENT_DATE, 'DUPOND', - ARRAY ['+33 6 84 56 32 14'], 'dupond@gmail.com', 'DURAND', ARRAY ['+33 6 45 25 14'], ARRAY ['durand@gmail.com'], - ARRAY ['escogriffe@dgse.spy', 'henri.duflot@dgse.spy'], ARRAY ['0918273645', '+33 6 00 00 00 00'], true, false, 'Equipé'), - (8, 'ABC000480070', '', 'TR0588', 'ZQ658496', 'DURER REJETER RECONNAÎTRE', 'FR', 15.5, 7.6, 'Auray', 'AY', 130, - 'LORIENT', 108, 'Pêche côtière', '3', 'Pêche', ARRAY ['PTM', 'OTM'], CURRENT_DATE, 'DUPOND', - ARRAY ['+33 6 84 56 32 14'], 'dupond@gmail.com', 'DURAND', ARRAY ['+33 6 45 25 14'], ARRAY ['durand@gmail.com'], - ARRAY ['escogriffe@dgse.spy', 'henri.duflot@dgse.spy'], ARRAY ['0918273645', '+33 6 00 00 00 00'], true, false, 'Equipé'), - (9, 'ABC000640738', '', 'IJU5217', 'EJ600773', 'PROFITER ESPRIT DEPUIS', 'FR', 15.5, 7.6, 'Auray', 'AY', 123, - 'LORIENT', 108, 'Pêche côtière', '3', 'Pêche', ARRAY ['PTM', 'OTM'], CURRENT_DATE, 'DUPOND', - ARRAY ['+33 6 84 56 32 14'], 'dupond@gmail.com', 'DURAND', ARRAY ['+33 6 45 25 14'], ARRAY ['durand@gmail.com'], - ARRAY ['escogriffe@dgse.spy', 'henri.duflot@dgse.spy'], ARRAY ['0918273645', '+33 6 00 00 00 00'], true, false, 'Equipé'), - (10, 'ABC000042310', '', 'IW783219', 'QD0506', 'COURANT MAIN PROFESSEUR', 'FR', 12.5, 7.6, 'Lorient', 'LO', 105, - 'LORIENT', 108, 'Pêche côtière', '3', 'Pêche', ARRAY ['PTM', 'OTM'], CURRENT_DATE + INTERVAL '2 days', 'DUPOND', - ARRAY ['+33 6 84 56 32 14'], 'dupond@gmail.com', 'DURAND', ARRAY ['+33 6 45 25 14'], ARRAY ['durand@gmail.com'], - ARRAY ['escogriffe@dgse.spy', 'henri.duflot@dgse.spy'], ARRAY ['0918273645', '+33 6 00 00 00 00'], true, false, 'Equipé'), - (11, 'ABC000597493', '', 'JL026591', 'CMQ7994', 'RENCONTRER VEILLER APPARTEMENT', 'FR', 15.5, 7.6, 'Auray', 'AY', 123, - 'LORIENT', 108, 'Pêche côtière', '3', 'Pêche', ARRAY ['PTM', 'OTM'], CURRENT_DATE + INTERVAL '5 days', 'DUPOND', - ARRAY ['+33 6 84 56 32 14'], 'dupond@gmail.com', 'DURAND', ARRAY ['+33 6 45 25 14'], ARRAY ['durand@gmail.com'], - ARRAY ['escogriffe@dgse.spy', 'henri.duflot@dgse.spy'], ARRAY ['0918273645', '+33 6 00 00 00 00'], true, false, 'Equipé'), - (12, 'FR263465414', '', 'IR123', '08FR65465', 'LE b@TO 2', 'FR', 15.5, 7.6, 'Auray', 'AY', 123, - 'LORIENT', 108, 'Pêche côtière', '3', 'Pêche', ARRAY ['PTM', 'OTM'], CURRENT_DATE + INTERVAL '5 days', 'DUPOND', - ARRAY ['+33 6 84 56 32 14'], 'dupond@gmail.com', 'DURAND', ARRAY ['+33 6 45 25 14'], ARRAY ['durand@gmail.com'], - ARRAY ['escogriffe@dgse.spy', 'henri.duflot@dgse.spy'], ARRAY ['0918273645', '+33 6 00 00 00 00'], true, false, 'Equipé'), - (13, 'FR263454484', '', 'FE4864', '8FR6541', 'NO NAME', 'FR', 15.5, 7.6, 'Auray', 'AY', 123, - 'LORIENT', 108, 'Pêche côtière', '3', 'Pêche', ARRAY ['PTM', 'OTM'], CURRENT_DATE + INTERVAL '5 days', 'DUPOND', - ARRAY ['+33 6 84 56 32 14'], 'dupond@gmail.com', 'DURAND', ARRAY ['+33 6 45 25 14'], ARRAY ['durand@gmail.com'], - ARRAY ['escogriffe@dgse.spy', 'henri.duflot@dgse.spy'], ARRAY ['0918273645', '+33 6 00 00 00 00'], true, false, 'Equipé'); - -INSERT INTO vessels (id, cfr, ircs, external_immatriculation, vessel_name) -VALUES (-1, 'UNKNOWN', 'UNKNOWN', 'UNKNOWN', 'UNKNOWN'); diff --git a/backend/src/main/resources/db/testdata/V666.2.1__Insert_more_dummy_vessels.sql b/backend/src/main/resources/db/testdata/V666.2.1__Insert_more_dummy_vessels.sql deleted file mode 100644 index 114b57c449..0000000000 --- a/backend/src/main/resources/db/testdata/V666.2.1__Insert_more_dummy_vessels.sql +++ /dev/null @@ -1,58 +0,0 @@ --- /!\ This file is automatically generated by a local script. --- Do NOT update it directly, update the associated .jsonc file in /backend/src/main/resources/db/testdata/json/. - -INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, length, under_charter) VALUES (101, 'CFR101', 'MMSI101', 'IRCS101', 'EXTIMM101', 'VIVA ESPANA', 'ES', 15, true); - -INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, length, under_charter) VALUES (102, 'CFR102', 'MMSI102', 'IRCS102', 'EXTIMM102', 'LEVE NEDERLAND', 'NL', 20, true); - -INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, length, under_charter) VALUES (103, 'CFR103', 'MMSI103', 'IRCS103', 'EXTIMM103', 'L''OM DU POISSON', 'FR', 11.99, true); - -INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, length, under_charter) VALUES (104, 'CFR104', 'MMSI104', 'IRCS104', 'EXTIMM104', 'DES BARS', NULL, 15, false); - -INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, length, under_charter) VALUES (105, 'CFR105', 'MMSI105', 'IRCS105', 'EXTIMM105', 'CALAMARO', 'FR', 16, false); - -INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, length, under_charter) VALUES (106, 'CFR106', 'MMSI106', 'IRCS106', 'EXTIMM106', 'L''ANCRE SÈCHE', 'FR', 7.5, false); - -INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, length, under_charter) VALUES (107, 'CFR107', 'MMSI107', 'IRCS107', 'EXTIMM107', 'MERLU L''ENCHANTEUR', 'FR', 18, false); - -INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, length, under_charter) VALUES (108, 'CFR108', 'MMSI108', 'IRCS108', 'EXTIMM108', 'LE POISSON AMBULANT', 'FR', 9, false); - -INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, length, under_charter) VALUES (109, 'CFR109', 'MMSI109', 'IRCS109', 'EXTIMM109', 'LE POISSON D''AVRIL', 'FR', 25, false); - -INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, length, under_charter) VALUES (110, 'CFR110', 'MMSI110', 'IRCS110', 'EXTIMM110', 'LA MER À BOIRE', 'FR', 12.5, false); - -INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, length, under_charter) VALUES (111, 'CFR111', 'MMSI111', 'IRCS111', 'EXTIMM111', 'LE MARIN D''EAU DOUCE', 'FR', 9.5, false); - -INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, length, under_charter) VALUES (112, 'CFR112', 'MMSI112', 'IRCS112', 'EXTIMM112', 'POISSON PAS NET', 'FR', 7.3, false); - -INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, length, under_charter) VALUES (113, 'CFR113', 'MMSI113', 'IRCS113', 'EXTIMM113', 'IN-ARÊTE-ABLE', 'FR', 8.5, false); - -INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, length, under_charter) VALUES (115, 'CFR115', 'MMSI115', 'IRCS115', 'EXTIMM115', 'DOS FIN', 'BE', 9.2, true); - -INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, length, under_charter) VALUES (116, 'CFR116', 'MMSI116', 'IRCS116', 'EXTIMM116', 'NAVIRE RENOMMÉ (NOUVEAU NOM)', 'FR', 11, false); - -INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, length, under_charter) VALUES (117, 'CFR117', 'MMSI117', 'IRCS117', 'EXTIMM117', 'QUEUE DE POISSON', 'FR', 10.9, false); - -INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, length, under_charter) VALUES (118, 'CFR118', 'MMSI118', 'IRCS118', 'EXTIMM118', 'GOUJON BOUGON', 'FR', 11.2, false); - -INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, length, under_charter) VALUES (119, 'CFR119', 'MMSI119', 'IRCS119', 'EXTIMM119', 'PAGEOT JO', 'FR', 11.1, false); - -INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, length, under_charter) VALUES (120, 'CFR120', 'MMSI120', 'IRCS120', 'EXTIMM120', 'VIVA L''ITALIA', 'IT', 11.1, false); - -INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, length, under_charter) VALUES (121, 'CFR121', 'MMSI121', 'IRCS121', 'EXTIMM121', 'MARE ET BASS', 'FR', 7.7, false); - -INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, length, under_charter) VALUES (122, 'CFR122', 'MMSI122', 'IRCS122', 'EXTIMM122', 'FILET DOUX', 'FR', 7.8, false); - -INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, length, under_charter) VALUES (123, 'CFR123', 'MMSI123', 'IRCS123', 'EXTIMM123', 'DÉVOILÉ', 'FR', 7.9, false); - -INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, length, under_charter) VALUES (124, 'CFR124', 'MMSI124', 'IRCS124', 'EXTIMM124', 'MAT QUILLE', 'FR', 8.1, false); - -INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, length, under_charter) VALUES (125, 'CFR125', 'MMSI125', 'IRCS125', 'EXTIMM125', 'BEAU SÉANT', 'FR', 8.2, false); - -INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, length, under_charter) VALUES (126, 'CFR126', 'MMSI126', 'IRCS126', 'EXTIMM126', 'THON BEAU', 'FR', 17.8, false); - -INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, length, under_charter) VALUES (127, 'CFR127', 'MMSI127', 'IRCS127', 'EXTIMM127', 'MILLE SABORDS', 'FR', 16.9, false); - -INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, length, under_charter) VALUES (128, 'CFR128', 'MMSI128', 'IRCS128', 'EXTIMM128', 'THE FLOATING KANGAROO', 'AU', 31, false); - -INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, length, under_charter) VALUES (129, 'CFR129', 'MMSI129', 'IRCS129', 'EXTIMM129', 'BON VENT', 'FR', 34.5, false); diff --git a/backend/src/main/resources/db/testdata/V666.2__Insert_dummy_vessels.sql b/backend/src/main/resources/db/testdata/V666.2__Insert_dummy_vessels.sql new file mode 100644 index 0000000000..d81c7acd6a --- /dev/null +++ b/backend/src/main/resources/db/testdata/V666.2__Insert_dummy_vessels.sql @@ -0,0 +1,86 @@ +-- /!\ This file is automatically generated by a local script. +-- Do NOT update it directly, update the associated .jsonc file in /backend/src/main/resources/db/testdata/json/ and execute 'make generate-test-data'. + +INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, width, length, district, district_code, gauge, registry_port, power, vessel_type, sailing_category, sailing_type, declared_fishing_gears, nav_licence_expiration_date, operator_name, operator_phones, operator_email, proprietor_name, proprietor_phones, proprietor_emails, vessel_emails, vessel_phones, under_charter, has_esacapt, logbook_equipment_status) VALUES (1, 'FAK000999999', '224103750', 'CALLME', 'DONTSINK', 'PHENOMENE', 'FR', 5, 12.89, 'Auray', 'AY', 123, 'LORIENT', 127, 'Pêche côtière', '3', 'Pêche', '{"SDN", "OTM"}', CURRENT_DATE, 'LE PELETIER', '{"+33 6 84 56 32 14"}', 'lepeletier@gmail.com', 'EL MALIK', '{"+33 6 45 25 14"}', '{"elmalik@gmail.com"}', NULL, NULL, false, false, 'Equipé'); + +INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, width, length, district, district_code, gauge, registry_port, power, vessel_type, sailing_category, sailing_type, declared_fishing_gears, nav_licence_expiration_date, operator_name, operator_phones, operator_email, proprietor_name, proprietor_phones, proprietor_emails, vessel_emails, vessel_phones, under_charter, has_esacapt, logbook_equipment_status) VALUES (2, 'U_W0NTFINDME', 'ABC123456', 'QGDF', 'TALK2ME', 'MALOTRU', 'X', 5, 12.89, 'Auray', 'AY', 123, 'LORIENT', 127, 'Pêche côtière', '3', 'Pêche', '{"SDN", "OTM"}', CURRENT_DATE, 'LE PELETIER', '{"+33 6 84 56 32 14"}', 'lepeletier@gmail.com', 'EL MALIK', '{"+33 6 45 25 14"}', '{"elmalik@gmail.com"}', '{"whatisyouremail@idontknow.anything"}', NULL, true, false, 'Equipé'); + +INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, width, length, district, district_code, gauge, registry_port, power, vessel_type, sailing_category, sailing_type, declared_fishing_gears, nav_licence_expiration_date, operator_name, operator_phones, operator_email, proprietor_name, proprietor_phones, proprietor_emails, vessel_emails, vessel_phones, under_charter, has_esacapt, logbook_equipment_status) VALUES (3, 'FR263418260', '224103750', 'IR12A', '08FR65324', 'LE b@TO', 'FR', 6, 14, 'Lorient', 'LT', 123, 'BREST', 237, 'Pêche côtière', '3', 'Pêche', '{"SDN", "OTB", "LNB"}', CURRENT_DATE, 'DUPOND', '{"+33 6 84 56 32 14"}', 'dupond@gmail.com', 'DURAND', '{"+33 6 45 25 14"}', '{"durand@gmail.com"}', '{"escogriffe@dgse.spy", "henri.duflot@dgse.spy"}', '{"0918273645", "+33 6 00 00 00 00"}', true, false, 'Equipé'); + +INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, width, length, district, district_code, gauge, registry_port, power, vessel_type, sailing_category, sailing_type, declared_fishing_gears, nav_licence_expiration_date, operator_name, operator_phones, operator_email, proprietor_name, proprietor_phones, proprietor_emails, vessel_emails, vessel_phones, under_charter, has_esacapt, logbook_equipment_status) VALUES (4, '', NULL, NULL, '', 'NO NAME', 'FR', 6, 14, 'Lorient', 'LT', 123, 'BREST', 237, 'Pêche côtière', '3', 'Pêche', '{"SDN", "OTB", "LNB"}', CURRENT_DATE, 'DUPOND', '{"+33 6 84 56 32 14"}', 'dupond@gmail.com', 'DURAND', '{"+33 6 45 25 14"}', '{"durand@gmail.com"}', '{"escogriffe@dgse.spy", "henri.duflot@dgse.spy"}', '{"0918273645", "+33 6 00 00 00 00"}', false, false, 'Equipé'); + +INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, width, length, district, district_code, gauge, registry_port, power, vessel_type, sailing_category, sailing_type, declared_fishing_gears, nav_licence_expiration_date, operator_name, operator_phones, operator_email, proprietor_name, proprietor_phones, proprietor_emails, vessel_emails, vessel_phones, under_charter, has_esacapt, logbook_equipment_status) VALUES (5, 'SOCR4T3', NULL, 'SCRT', 'LePhiloFilou', 'SOCRATE', 'FR', 4, 19.29, 'Athènes', 'AT', 293, 'ATHENES', 531, 'Pêche et abricots', '4', 'Pêche', '{"PTM", "OTM"}', CURRENT_DATE, 'PARTHENON PHISHING', '{"+33 6 84 56 32 19"}', 'parthenon@phishing.gr', 'ZEUS', '{"+33 6 45 25 19"}', '{"zeus@phishing.gr"}', '{"brossetoilesdents@email.diamant"}', NULL, true, false, 'Equipé'); + +INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, width, length, district, district_code, gauge, registry_port, power, vessel_type, sailing_category, sailing_type, declared_fishing_gears, nav_licence_expiration_date, operator_name, operator_phones, operator_email, proprietor_name, proprietor_phones, proprietor_emails, vessel_emails, vessel_phones, under_charter, has_esacapt, logbook_equipment_status) VALUES (6, 'ABC000939217', '', 'SC6082', 'RU460262', 'FRAIS AVIS MODE', 'FR', 15.5, 7.6, 'Auray', 'AY', 130, 'LORIENT', 240, 'Grande pêche', '3', 'Transport', '{"SDN", "OTM", "O3O"}', CURRENT_DATE, 'DABADIE', '{"+33 6 78 35 92 12"}', 'dabadie@gmail.com', 'GARCIA', '{"+33 6 32 57 09"}', '{"garcia@vessels.fr"}', '{"email@fraisavismode.com"}', '{"+33 6 75 23 10 12"}', true, false, 'Non Equipé'); + +INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, width, length, district, district_code, gauge, registry_port, power, vessel_type, sailing_category, sailing_type, declared_fishing_gears, nav_licence_expiration_date, operator_name, operator_phones, operator_email, proprietor_name, proprietor_phones, proprietor_emails, vessel_emails, vessel_phones, under_charter, has_esacapt, logbook_equipment_status) VALUES (7, 'ABC000717263', NULL, 'QP6933', 'IG860866', 'ÉCRASER TON IMPOSSIBLE', 'FR', 15.5, 7.6, 'Auray', 'AY', 123, 'LORIENT', 108, 'Pêche côtière', '3', 'Pêche', '{"PTM", "OTM"}', CURRENT_DATE, 'DUPOND', '{"+33 6 84 56 32 14"}', 'dupond@gmail.com', 'DURAND', '{"+33 6 45 25 14"}', '{"durand@gmail.com"}', '{"escogriffe@dgse.spy", "henri.duflot@dgse.spy"}', '{"0918273645", "+33 6 00 00 00 00"}', true, false, 'Equipé'); + +INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, width, length, district, district_code, gauge, registry_port, power, vessel_type, sailing_category, sailing_type, declared_fishing_gears, nav_licence_expiration_date, operator_name, operator_phones, operator_email, proprietor_name, proprietor_phones, proprietor_emails, vessel_emails, vessel_phones, under_charter, has_esacapt, logbook_equipment_status) VALUES (8, 'ABC000480070', NULL, 'TR0588', 'ZQ658496', 'DURER REJETER RECONNAÎTRE', 'FR', 15.5, 7.6, 'Auray', 'AY', 130, 'LORIENT', 108, 'Pêche côtière', '3', 'Pêche', '{"PTM", "OTM"}', CURRENT_DATE, 'DUPOND', '{"+33 6 84 56 32 14"}', 'dupond@gmail.com', 'DURAND', '{"+33 6 45 25 14"}', '{"durand@gmail.com"}', '{"escogriffe@dgse.spy", "henri.duflot@dgse.spy"}', '{"0918273645", "+33 6 00 00 00 00"}', true, false, 'Equipé'); + +INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, width, length, district, district_code, gauge, registry_port, power, vessel_type, sailing_category, sailing_type, declared_fishing_gears, nav_licence_expiration_date, operator_name, operator_phones, operator_email, proprietor_name, proprietor_phones, proprietor_emails, vessel_emails, vessel_phones, under_charter, has_esacapt, logbook_equipment_status) VALUES (9, 'ABC000640738', NULL, 'IJU5217', 'EJ600773', 'PROFITER ESPRIT DEPUIS', 'FR', 15.5, 7.6, 'Auray', 'AY', 123, 'LORIENT', 108, 'Pêche côtière', '3', 'Pêche', '{"PTM", "OTM"}', CURRENT_DATE, 'DUPOND', '{"+33 6 84 56 32 14"}', 'dupond@gmail.com', 'DURAND', '{"+33 6 45 25 14"}', '{"durand@gmail.com"}', '{"escogriffe@dgse.spy", "henri.duflot@dgse.spy"}', '{"0918273645", "+33 6 00 00 00 00"}', true, false, 'Equipé'); + +INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, width, length, district, district_code, gauge, registry_port, power, vessel_type, sailing_category, sailing_type, declared_fishing_gears, nav_licence_expiration_date, operator_name, operator_phones, operator_email, proprietor_name, proprietor_phones, proprietor_emails, vessel_emails, vessel_phones, under_charter, has_esacapt, logbook_equipment_status) VALUES (10, 'ABC000042310', NULL, 'IW783219', 'QD0506', 'COURANT MAIN PROFESSEUR', 'FR', 12.5, 7.6, 'Lorient', 'LO', 105, 'LORIENT', 108, 'Pêche côtière', '3', 'Pêche', '{"PTM", "OTM"}', CURRENT_DATE + INTERVAL '2 days', 'DUPOND', '{"+33 6 84 56 32 14"}', 'dupond@gmail.com', 'DURAND', '{"+33 6 45 25 14"}', '{"durand@gmail.com"}', '{"escogriffe@dgse.spy", "henri.duflot@dgse.spy"}', '{"0918273645", "+33 6 00 00 00 00"}', true, false, 'Equipé'); + +INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, width, length, district, district_code, gauge, registry_port, power, vessel_type, sailing_category, sailing_type, declared_fishing_gears, nav_licence_expiration_date, operator_name, operator_phones, operator_email, proprietor_name, proprietor_phones, proprietor_emails, vessel_emails, vessel_phones, under_charter, has_esacapt, logbook_equipment_status) VALUES (11, 'ABC000597493', NULL, 'JL026591', 'CMQ7994', 'RENCONTRER VEILLER APPARTEMENT', 'FR', 15.5, 7.6, 'Auray', 'AY', 123, 'LORIENT', 108, 'Pêche côtière', '3', 'Pêche', '{"PTM", "OTM"}', CURRENT_DATE + INTERVAL '5 days', 'DUPOND', '{"+33 6 84 56 32 14"}', 'dupond@gmail.com', 'DURAND', '{"+33 6 45 25 14"}', '{"durand@gmail.com"}', '{"escogriffe@dgse.spy", "henri.duflot@dgse.spy"}', '{"0918273645", "+33 6 00 00 00 00"}', true, false, 'Equipé'); + +INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, width, length, district, district_code, gauge, registry_port, power, vessel_type, sailing_category, sailing_type, declared_fishing_gears, nav_licence_expiration_date, operator_name, operator_phones, operator_email, proprietor_name, proprietor_phones, proprietor_emails, vessel_emails, vessel_phones, under_charter, has_esacapt, logbook_equipment_status) VALUES (12, 'FR263465414', '', 'IR123', '08FR65465', 'LE b@TO 2', 'FR', 15.5, 7.6, 'Auray', 'AY', 123, 'LORIENT', 108, 'Pêche côtière', '3', 'Pêche', '{"PTM", "OTM"}', CURRENT_DATE + INTERVAL '5 days', 'DUPOND', '{"+33 6 84 56 32 14"}', 'dupond@gmail.com', 'DURAND', '{"+33 6 45 25 14"}', '{"durand@gmail.com"}', '{"escogriffe@dgse.spy", "henri.duflot@dgse.spy"}', '{"0918273645", "+33 6 00 00 00 00"}', true, false, 'Equipé'); + +INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, width, length, district, district_code, gauge, registry_port, power, vessel_type, sailing_category, sailing_type, declared_fishing_gears, nav_licence_expiration_date, operator_name, operator_phones, operator_email, proprietor_name, proprietor_phones, proprietor_emails, vessel_emails, vessel_phones, under_charter, has_esacapt, logbook_equipment_status) VALUES (13, 'FR263454484', '', 'FE4864', '8FR6541', 'NO NAME', 'FR', 15.5, 7.6, 'Auray', 'AY', 123, 'LORIENT', 108, 'Pêche côtière', '3', 'Pêche', '{"PTM", "OTM"}', CURRENT_DATE + INTERVAL '5 days', 'DUPOND', '{"+33 6 84 56 32 14"}', 'dupond@gmail.com', 'DURAND', '{"+33 6 45 25 14"}', '{"durand@gmail.com"}', '{"escogriffe@dgse.spy", "henri.duflot@dgse.spy"}', '{"0918273645", "+33 6 00 00 00 00"}', true, false, 'Equipé'); + +INSERT INTO vessels (id, cfr, ircs, external_immatriculation, vessel_name) VALUES (-1, 'UNKNOWN', 'UNKNOWN', 'UNKNOWN', 'UNKNOWN'); + +INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, length, under_charter) VALUES (101, 'CFR101', 'MMSI101', 'IRCS101', 'EXTIMM101', 'VIVA ESPANA', 'ES', 15, true); + +INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, length, under_charter) VALUES (102, 'CFR102', 'MMSI102', 'IRCS102', 'EXTIMM102', 'LEVE NEDERLAND', 'NL', 20, true); + +INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, length, under_charter) VALUES (103, 'CFR103', 'MMSI103', 'IRCS103', 'EXTIMM103', 'L''OM DU POISSON', 'FR', 11.99, true); + +INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, length, under_charter) VALUES (104, 'CFR104', 'MMSI104', 'IRCS104', 'EXTIMM104', 'DES BARS', NULL, 15, false); + +INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, length, under_charter) VALUES (105, 'CFR105', 'MMSI105', 'IRCS105', 'EXTIMM105', 'CALAMARO', 'FR', 16, false); + +INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, length, under_charter) VALUES (106, 'CFR106', 'MMSI106', 'IRCS106', 'EXTIMM106', 'L''ANCRE SÈCHE', 'FR', 7.5, false); + +INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, length, under_charter) VALUES (107, 'CFR107', 'MMSI107', 'IRCS107', 'EXTIMM107', 'MERLU L''ENCHANTEUR', 'FR', 18, false); + +INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, length, under_charter) VALUES (108, 'CFR108', 'MMSI108', 'IRCS108', 'EXTIMM108', 'LE POISSON AMBULANT', 'FR', 9, false); + +INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, length, under_charter) VALUES (109, 'CFR109', 'MMSI109', 'IRCS109', 'EXTIMM109', 'LE POISSON D''AVRIL', 'FR', 25, false); + +INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, length, under_charter) VALUES (110, 'CFR110', 'MMSI110', 'IRCS110', 'EXTIMM110', 'LA MER À BOIRE', 'FR', 12.5, false); + +INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, length, under_charter) VALUES (111, 'CFR111', 'MMSI111', 'IRCS111', 'EXTIMM111', 'LE MARIN D''EAU DOUCE', 'FR', 9.5, false); + +INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, length, under_charter) VALUES (112, 'CFR112', 'MMSI112', 'IRCS112', 'EXTIMM112', 'POISSON PAS NET', 'FR', 7.3, false); + +INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, length, under_charter) VALUES (113, 'CFR113', 'MMSI113', 'IRCS113', 'EXTIMM113', 'IN-ARÊTE-ABLE', 'FR', 8.5, false); + +INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, length, under_charter) VALUES (115, 'CFR115', 'MMSI115', 'IRCS115', 'EXTIMM115', 'DOS FIN', 'BE', 9.2, true); + +INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, length, under_charter) VALUES (116, 'CFR116', 'MMSI116', 'IRCS116', 'EXTIMM116', 'NAVIRE RENOMMÉ (NOUVEAU NOM)', 'FR', 11, false); + +INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, length, under_charter) VALUES (117, 'CFR117', 'MMSI117', 'IRCS117', 'EXTIMM117', 'QUEUE DE POISSON', 'FR', 10.9, false); + +INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, length, under_charter) VALUES (118, 'CFR118', 'MMSI118', 'IRCS118', 'EXTIMM118', 'GOUJON BOUGON', 'FR', 11.2, false); + +INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, length, under_charter) VALUES (119, 'CFR119', 'MMSI119', 'IRCS119', 'EXTIMM119', 'PAGEOT JO', 'FR', 11.1, false); + +INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, length, under_charter) VALUES (120, 'CFR120', 'MMSI120', 'IRCS120', 'EXTIMM120', 'VIVA L''ITALIA', 'IT', 11.1, false); + +INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, length, under_charter) VALUES (121, 'CFR121', 'MMSI121', 'IRCS121', 'EXTIMM121', 'MARE ET BASS', 'FR', 7.7, false); + +INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, length, under_charter) VALUES (122, 'CFR122', 'MMSI122', 'IRCS122', 'EXTIMM122', 'FILET DOUX', 'FR', 7.8, false); + +INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, length, under_charter) VALUES (123, 'CFR123', 'MMSI123', 'IRCS123', 'EXTIMM123', 'DÉVOILÉ', 'FR', 7.9, false); + +INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, length, under_charter) VALUES (124, 'CFR124', 'MMSI124', 'IRCS124', 'EXTIMM124', 'MAT QUILLE', 'FR', 8.1, false); + +INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, length, under_charter) VALUES (125, 'CFR125', 'MMSI125', 'IRCS125', 'EXTIMM125', 'BEAU SÉANT', 'FR', 8.2, false); + +INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, length, under_charter) VALUES (126, 'CFR126', 'MMSI126', 'IRCS126', 'EXTIMM126', 'THON BEAU', 'FR', 17.8, false); + +INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, length, under_charter) VALUES (127, 'CFR127', 'MMSI127', 'IRCS127', 'EXTIMM127', 'MILLE SABORDS', 'FR', 16.9, false); + +INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, length, under_charter) VALUES (128, 'CFR128', 'MMSI128', 'IRCS128', 'EXTIMM128', 'THE FLOATING KANGAROO', 'AU', 31, false); + +INSERT INTO vessels (id, cfr, mmsi, ircs, external_immatriculation, vessel_name, flag_state, length, under_charter) VALUES (129, 'CFR129', 'MMSI129', 'IRCS129', 'EXTIMM129', 'BON VENT', 'FR', 34.5, false); diff --git a/backend/src/main/resources/db/testdata/V666.5.1__Insert_more_pno_logbook_reports.sql b/backend/src/main/resources/db/testdata/V666.5.1__Insert_more_pno_logbook_reports.sql index 7645dfa529..628fd84a1c 100644 --- a/backend/src/main/resources/db/testdata/V666.5.1__Insert_more_pno_logbook_reports.sql +++ b/backend/src/main/resources/db/testdata/V666.5.1__Insert_more_pno_logbook_reports.sql @@ -1,5 +1,5 @@ -- /!\ This file is automatically generated by a local script. --- Do NOT update it directly, update the associated .jsonc file in /backend/src/main/resources/db/testdata/json/. +-- Do NOT update it directly, update the associated .jsonc file in /backend/src/main/resources/db/testdata/json/ and execute 'make generate-test-data'. INSERT INTO logbook_raw_messages (operation_number, xml_message) VALUES ('FAKE_OPERATION_101', 'Message FLUX xml'); diff --git a/backend/src/main/resources/db/testdata/V666.5.2__Insert_dummy_manual_prior_notifications.sql b/backend/src/main/resources/db/testdata/V666.5.2__Insert_dummy_manual_prior_notifications.sql index 4fd236616f..05f4a4b997 100644 --- a/backend/src/main/resources/db/testdata/V666.5.2__Insert_dummy_manual_prior_notifications.sql +++ b/backend/src/main/resources/db/testdata/V666.5.2__Insert_dummy_manual_prior_notifications.sql @@ -1,5 +1,5 @@ -- /!\ This file is automatically generated by a local script. --- Do NOT update it directly, update the associated .jsonc file in /backend/src/main/resources/db/testdata/json/. +-- Do NOT update it directly, update the associated .jsonc file in /backend/src/main/resources/db/testdata/json/ and execute 'make generate-test-data'. INSERT INTO manual_prior_notifications (report_id, cfr, vessel_id, created_at, did_not_fish_after_zero_notice, flag_state, sent_at, trip_gears, trip_segments, updated_at, vessel_name, value) VALUES ('00000000-0000-4000-0000-000000000001', 'CFR112', 112, NOW() AT TIME ZONE 'UTC' - INTERVAL '15 minutes', false, 'FRA', NOW() AT TIME ZONE 'UTC' - INTERVAL '30 minutes', '[{"gear":"LNP"}]', '[{"segment":"NWW09","segmentName":"Lignes"}]', NOW() AT TIME ZONE 'UTC' - INTERVAL '15 minutes', 'POISSON PAS NET', '{"authorTrigram":"ABC","riskFactor":2.1,"catchOnboard":[{"faoZone":"21.1.A","weight":72,"nbFish":null,"species":"SOS"}],"catchToLand":[{"faoZone":"21.1.A","weight":72,"nbFish":null,"species":"SOS"}],"faoZone":null,"isBeingSent":false,"isInVerificationScope":false,"isSent":false,"isVerified":false,"note":null,"pnoTypes":[{"pnoTypeName":"Préavis type A","minimumNotificationPeriod":4,"hasDesignatedPorts":false}],"port":"FRVNE","predictedArrivalDatetimeUtc":null,"predictedLandingDatetimeUtc":null,"purpose":"LAN","tripStartDate":null}'); UPDATE manual_prior_notifications SET value = JSONB_SET(value, '{predictedArrivalDatetimeUtc}', TO_JSONB(TO_CHAR(NOW() AT TIME ZONE 'UTC' + INTERVAL '3 hours', 'YYYY-MM-DD"T"HH24:MI:SS"Z"')), true) WHERE report_id = '00000000-0000-4000-0000-000000000001'; diff --git a/backend/src/main/resources/db/testdata/json/V666.19.1__Insert_more_dummy_reportings.jsonc b/backend/src/main/resources/db/testdata/json/V666.19.1__Insert_more_dummy_reportings.jsonc deleted file mode 100644 index e3398f94fe..0000000000 --- a/backend/src/main/resources/db/testdata/json/V666.19.1__Insert_more_dummy_reportings.jsonc +++ /dev/null @@ -1,129 +0,0 @@ -[ - { - "table": "reportings", - "afterAll": "SELECT setval('reportings_id_seq', (SELECT MAX(id) FROM reportings));", - "data": [ - // - Vessel: VIVA ESPANA - // - With 2 reportings - { - "id": 9, - "archived": false, - "creation_date:sql": "NOW() AT TIME ZONE 'UTC' - INTERVAL '10 days'", - "deleted": false, - "external_reference_number": "EXTIMM101", - "flag_state": "FR", - "internal_reference_number": "CFR101", - "ircs": "IRCS101", - "latitude": null, - "longitude": null, - "type": "INFRACTION_SUSPICION", - "validation_date": null, - "value:jsonb": { - "authorContact": "Jean Bon (0623456789)", - "authorTrigram": "LTH", - "controlUnitId": 10012, - "description": "Une description d'infraction.", - "dml": "DML 29", - "natinfCode": 27689, - "reportingActor": "OPS", - "seaFront": "NAMO", - "title": "Suspicion d'infraction 9", - "type": "INFRACTION_SUSPICION" - }, - "vessel_id": 101, - "vessel_identifier": "INTERNAL_REFERENCE_NUMBER", - "vessel_name": "VIVA ESPANA" - }, - { - "id": 10, - "archived": false, - "creation_date:sql": "NOW() AT TIME ZONE 'UTC' - INTERVAL '15 days'", - "deleted": false, - "external_reference_number": "EXTIMM101", - "flag_state": "FR", - "internal_reference_number": "CFR101", - "ircs": "IRCS101", - "latitude": null, - "longitude": null, - "type": "INFRACTION_SUSPICION", - "validation_date": null, - "value:jsonb": { - "authorContact": "Jean Bon (0623456789)", - "authorTrigram": "LTH", - "controlUnitId": 10012, - "description": "Une description d'infraction.", - "dml": "DML 29", - "natinfCode": 27689, - "reportingActor": "OPS", - "seaFront": "NAMO", - "title": "Suspicion d'infraction 10", - "type": "INFRACTION_SUSPICION" - }, - "vessel_id": 101, - "vessel_identifier": "INTERNAL_REFERENCE_NUMBER", - "vessel_name": "VIVA ESPANA" - }, - - // - Vessel: DOS FIN - // - With 2 reportings - { - "id": 11, - "archived": false, - "creation_date:sql": "NOW() AT TIME ZONE 'UTC' - INTERVAL '20 days'", - "deleted": false, - "external_reference_number": "EXTIMM115", - "flag_state": "FR", - "internal_reference_number": "CFR115", - "ircs": "IRCS115", - "latitude": null, - "longitude": null, - "type": "INFRACTION_SUSPICION", - "validation_date": null, - "value:jsonb": { - "authorContact": "Jean Bon (0623456789)", - "authorTrigram": "LTH", - "controlUnitId": 10012, - "description": "Une description d'infraction.", - "dml": "DML 29", - "natinfCode": 27689, - "reportingActor": "OPS", - "seaFront": "NAMO", - "title": "Suspicion d'infraction 11", - "type": "INFRACTION_SUSPICION" - }, - "vessel_id": 115, - "vessel_identifier": "INTERNAL_REFERENCE_NUMBER", - "vessel_name": "DOS FIN" - }, - { - "id": 12, - "archived": false, - "creation_date:sql": "NOW() AT TIME ZONE 'UTC' - INTERVAL '25 days'", - "deleted": false, - "external_reference_number": "EXTIMM115", - "flag_state": "FR", - "internal_reference_number": "CFR115", - "ircs": "IRCS115", - "latitude": null, - "longitude": null, - "type": "INFRACTION_SUSPICION", - "validation_date": null, - "value:jsonb": { - "authorContact": "Jean Bon (0623456789)", - "authorTrigram": "LTH", - "controlUnitId": 10012, - "description": "Une description d'infraction.", - "dml": "DML 29", - "natinfCode": 27689, - "reportingActor": "OPS", - "seaFront": "NAMO", - "title": "Suspicion d'infraction 212", - "type": "INFRACTION_SUSPICION" - }, - "vessel_id": 115, - "vessel_identifier": "INTERNAL_REFERENCE_NUMBER", - "vessel_name": "DOS FIN" - } - ] - } -] diff --git a/backend/src/main/resources/db/testdata/json/V666.19__Insert_dummy_reportings.jsonc b/backend/src/main/resources/db/testdata/json/V666.19__Insert_dummy_reportings.jsonc new file mode 100644 index 0000000000..3296e0dab8 --- /dev/null +++ b/backend/src/main/resources/db/testdata/json/V666.19__Insert_dummy_reportings.jsonc @@ -0,0 +1,338 @@ +[ + { + "table": "reportings", + "afterAll": "SELECT setval('reportings_id_seq', (SELECT MAX(id) FROM reportings));", + "beforeAll": "TRUNCATE TABLE reportings RESTART IDENTITY CASCADE;", + "data": [ + // - Vessel: MARIAGE ÎLE HASARD + // - With 3 reportings + { + "archived": false, + "creation_date:sql": "NOW() - INTERVAL '1 day'", + "deleted": false, + "external_reference_number": "VP374069", + "flag_state": "FR", + "internal_reference_number": "ABC000180832", + "ircs": "CG1312", + "latitude": 41.569, + "longitude": 37.28, + "type": "ALERT", + "validation_date:sql": "NOW() - INTERVAL '30 minutes'", + "value:jsonb": { + "seaFront": "NAMO", + "riskFactor": 3.5647, + "type": "THREE_MILES_TRAWLING_ALERT", + "natinfCode": 7059 + }, + "vessel_id": 123456, + "vessel_identifier": "INTERNAL_REFERENCE_NUMBER", + "vessel_name": "MARIAGE ÎLE HASARD" + }, + { + "archived": true, + "creation_date:sql": "NOW() - INTERVAL '3 day'", + "deleted": false, + "external_reference_number": "VP374069", + "flag_state": "FR", + "internal_reference_number": "ABC000180832", + "ircs": "CG1312", + "latitude": null, + "longitude": null, + "type": "ALERT", + "validation_date:sql": "NOW() - INTERVAL '4 day'", + "value:jsonb": { + "seaFront": "NAMO", + "riskFactor": 3.3647, + "type": "THREE_MILES_TRAWLING_ALERT", + "natinfCode": 7059 + }, + "vessel_id": 123456, + "vessel_identifier": "INTERNAL_REFERENCE_NUMBER", + "vessel_name": "MARIAGE ÎLE HASARD" + }, + { + "archived": true, + "creation_date:sql": "NOW() - INTERVAL '4 day'", + "deleted": true, + "external_reference_number": "VP374069", + "flag_state": "FR", + "internal_reference_number": "ABC000180832", + "ircs": "CG1312", + "latitude": -5.569, + "longitude": 71.569, + "type": "ALERT", + "validation_date:sql": "NOW() - INTERVAL '5 day'", + "value:jsonb": { + "seaFront": "NAMO", + "riskFactor": 3.6947, + "type": "MISSING_FAR_ALERT", + "natinfCode": 27689 + }, + "vessel_id": 123456, + "vessel_identifier": "INTERNAL_REFERENCE_NUMBER", + "vessel_name": "MARIAGE ÎLE HASARD" + }, + + // - Vessel: PROMETTRE INTÉRIEUR SAINT + // - With 1 reporting + { + "archived": false, + "creation_date:sql": "NOW() - INTERVAL '1 day'", + "deleted": false, + "external_reference_number": "ZJ472279", + "flag_state": "FR", + "internal_reference_number": "ABC000232227", + "ircs": "TMG5756", + "latitude": 1.123, + "longitude": -12.569, + "type": "ALERT", + "validation_date:sql": "NOW()", + "value:jsonb": { + "seaFront": "SA", + "riskFactor": 2.647, + "type": "TWELVE_MILES_FISHING_ALERT", + "natinfCode": 2610 + }, + "vessel_id": null, + "vessel_identifier": "INTERNAL_REFERENCE_NUMBER", + "vessel_name": "PROMETTRE INTÉRIEUR SAINT" + }, + + // - Vessel: HAÏR GAUCHE VIVRE + // - With 1 reporting + { + "archived": false, + "creation_date:sql": "NOW() - INTERVAL '2 day'", + "deleted": false, + "external_reference_number": "HK498094", + "flag_state": "FR", + "internal_reference_number": "ABC000591595", + "ircs": "KF0313", + "latitude": null, + "longitude": null, + "type": "ALERT", + "validation_date:sql": "NOW() - INTERVAL '1 day'", + "value:jsonb": { + "seaFront": "MEMN", + "flagState": "FR", + "riskFactor": 1.389, + "type": "MISSING_FAR_ALERT", + "natinfCode": 27689 + }, + "vessel_id": null, + "vessel_identifier": "INTERNAL_REFERENCE_NUMBER", + "vessel_name": "HAÏR GAUCHE VIVRE" + }, + + // - Vessel: COURANT MAIN PROFESSEUR + // - With 1 reporting + { + "archived": false, + "creation_date:sql": "NOW() - INTERVAL '1 day'", + "deleted": false, + "external_reference_number": "IW783219", + "flag_state": "FR", + "internal_reference_number": "ABC000042310", + "ircs": "QD0506", + "latitude": null, + "longitude": null, + "type": "INFRACTION_SUSPICION", + "validation_date:sql": "NOW() - INTERVAL '1 day'", + "value:jsonb": { + "reportingActor": "OPS", + "controlUnitId": null, + "authorTrigram": "LTH", + "authorContact": "", + "title": "Suspicion de chalutage dans les 3 milles", + "description": "Chalutage dans les 3 milles (vitesse & parcours pêche) le 22/08/22 à 22h56", + "natinfCode": 23588, + "dml": "DML 29", + "type": "INFRACTION_SUSPICION", + "seaFront": "NAMO" + }, + "vessel_id": 10, + "vessel_identifier": "INTERNAL_REFERENCE_NUMBER", + "vessel_name": "COURANT MAIN PROFESSEUR" + }, + + // - Vessel: RENCONTRER VEILLER APPARTEMENT + // - With 2 reportings + { + "archived": false, + "creation_date:sql": "NOW() - INTERVAL '1 day 1 hour'", + "deleted": false, + "external_reference_number": "JL026591", + "flag_state": "FR", + "internal_reference_number": "ABC000597493", + "ircs": "CMQ7994", + "latitude": null, + "longitude": null, + "type": "INFRACTION_SUSPICION", + "validation_date": null, + "value:jsonb": { + "reportingActor": "UNIT", + "controlUnitId": 10012, + "authorTrigram": "LTH", + "authorContact": "Jean Bon (0600000000)", + "title": "Pêche sans VMS ni JPE", + "description": "Pêche thon rouge sans VMS détecté ni JPE", + "natinfCode": 27689, + "dml": "DML 29", + "type": "INFRACTION_SUSPICION", + "seaFront": "NAMO" + }, + "vessel_id": 11, + "vessel_identifier": "INTERNAL_REFERENCE_NUMBER", + "vessel_name": "RENCONTRER VEILLER APPARTEMENT" + }, + { + "archived": false, + "creation_date:sql": "NOW() - INTERVAL '1 day 1 hour'", + "deleted": false, + "external_reference_number": "JL026591", + "flag_state": "FR", + "internal_reference_number": "ABC000597493", + "ircs": "CMQ7994", + "latitude": null, + "longitude": null, + "type": "OBSERVATION", + "validation_date:sql": "NOW() - INTERVAL '1 day 1 hour'", + "value:jsonb": { + "reportingActor": "UNIT", + "controlUnitId": 10012, + "authorTrigram": "", + "authorContact": "Jean Bon (0600000000)", + "title": "OBSERVATION: Pêche sans VMS ni JPE", + "description": "OBSERVATION: Pêche thon rouge sans VMS détecté ni JPE", + "type": "OBSERVATION", + "seaFront": "NAMO" + }, + "vessel_id": 11, + "vessel_identifier": "INTERNAL_REFERENCE_NUMBER", + "vessel_name": "RENCONTRER VEILLER APPARTEMENT" + }, + + // - Vessel: VIVA ESPANA + // - With 2 reportings + { + "id": 9, + "archived": false, + "creation_date:sql": "NOW() AT TIME ZONE 'UTC' - INTERVAL '10 days'", + "deleted": false, + "external_reference_number": "EXTIMM101", + "flag_state": "FR", + "internal_reference_number": "CFR101", + "ircs": "IRCS101", + "latitude": null, + "longitude": null, + "type": "INFRACTION_SUSPICION", + "validation_date": null, + "value:jsonb": { + "authorContact": "Jean Bon (0623456789)", + "authorTrigram": "LTH", + "controlUnitId": 10012, + "description": "Une description d'infraction.", + "dml": "DML 29", + "natinfCode": 27689, + "reportingActor": "OPS", + "seaFront": "NAMO", + "title": "Suspicion d'infraction 9", + "type": "INFRACTION_SUSPICION" + }, + "vessel_id": 101, + "vessel_identifier": "INTERNAL_REFERENCE_NUMBER", + "vessel_name": "VIVA ESPANA" + }, + { + "id": 10, + "archived": false, + "creation_date:sql": "NOW() AT TIME ZONE 'UTC' - INTERVAL '15 days'", + "deleted": false, + "external_reference_number": "EXTIMM101", + "flag_state": "FR", + "internal_reference_number": "CFR101", + "ircs": "IRCS101", + "latitude": null, + "longitude": null, + "type": "INFRACTION_SUSPICION", + "validation_date": null, + "value:jsonb": { + "authorContact": "Jean Bon (0623456789)", + "authorTrigram": "LTH", + "controlUnitId": 10012, + "description": "Une description d'infraction.", + "dml": "DML 29", + "natinfCode": 27689, + "reportingActor": "OPS", + "seaFront": "NAMO", + "title": "Suspicion d'infraction 10", + "type": "INFRACTION_SUSPICION" + }, + "vessel_id": 101, + "vessel_identifier": "INTERNAL_REFERENCE_NUMBER", + "vessel_name": "VIVA ESPANA" + }, + + // - Vessel: DOS FIN + // - With 2 reportings + { + "id": 11, + "archived": false, + "creation_date:sql": "NOW() AT TIME ZONE 'UTC' - INTERVAL '20 days'", + "deleted": false, + "external_reference_number": "EXTIMM115", + "flag_state": "FR", + "internal_reference_number": "CFR115", + "ircs": "IRCS115", + "latitude": null, + "longitude": null, + "type": "INFRACTION_SUSPICION", + "validation_date": null, + "value:jsonb": { + "authorContact": "Jean Bon (0623456789)", + "authorTrigram": "LTH", + "controlUnitId": 10012, + "description": "Une description d'infraction.", + "dml": "DML 29", + "natinfCode": 27689, + "reportingActor": "OPS", + "seaFront": "NAMO", + "title": "Suspicion d'infraction 11", + "type": "INFRACTION_SUSPICION" + }, + "vessel_id": 115, + "vessel_identifier": "INTERNAL_REFERENCE_NUMBER", + "vessel_name": "DOS FIN" + }, + { + "id": 12, + "archived": false, + "creation_date:sql": "NOW() AT TIME ZONE 'UTC' - INTERVAL '25 days'", + "deleted": false, + "external_reference_number": "EXTIMM115", + "flag_state": "FR", + "internal_reference_number": "CFR115", + "ircs": "IRCS115", + "latitude": null, + "longitude": null, + "type": "INFRACTION_SUSPICION", + "validation_date": null, + "value:jsonb": { + "authorContact": "Jean Bon (0623456789)", + "authorTrigram": "LTH", + "controlUnitId": 10012, + "description": "Une description d'infraction.", + "dml": "DML 29", + "natinfCode": 27689, + "reportingActor": "OPS", + "seaFront": "NAMO", + "title": "Suspicion d'infraction 212", + "type": "INFRACTION_SUSPICION" + }, + "vessel_id": 115, + "vessel_identifier": "INTERNAL_REFERENCE_NUMBER", + "vessel_name": "DOS FIN" + } + ] + } +] diff --git a/backend/src/main/resources/db/testdata/json/V666.2.1__Insert_more_dummy_vessels.jsonc b/backend/src/main/resources/db/testdata/json/V666.2.1__Insert_more_dummy_vessels.jsonc deleted file mode 100644 index d93cafbe22..0000000000 --- a/backend/src/main/resources/db/testdata/json/V666.2.1__Insert_more_dummy_vessels.jsonc +++ /dev/null @@ -1,394 +0,0 @@ -[ - { - "table": "vessels", - "data": [ - // - Vessel: VIVA ESPANA - // - Flag state: ES - // - Under charter - { - "id": 101, - "cfr": "CFR101", - "mmsi": "MMSI101", - "ircs": "IRCS101", - "external_immatriculation": "EXTIMM101", - "vessel_name": "VIVA ESPANA", - "flag_state": "ES", - "length": 15, - "under_charter": true - }, - - // - Vessel: LEVE NEDERLAND - // - Flag state: NL - // - Under charter - { - "id": 102, - "cfr": "CFR102", - "mmsi": "MMSI102", - "ircs": "IRCS102", - "external_immatriculation": "EXTIMM102", - "vessel_name": "LEVE NEDERLAND", - "flag_state": "NL", - "length": 20, - "under_charter": true - }, - - // - Vessel: L'OM DU POISSON - // - Under charter - { - "id": 103, - "cfr": "CFR103", - "mmsi": "MMSI103", - "ircs": "IRCS103", - "external_immatriculation": "EXTIMM103", - "vessel_name": "L'OM DU POISSON", - "flag_state": "FR", - "length": 11.99, - "under_charter": true - }, - - // - Vessel: DES BARS - // - Flag state: Unknown - { - "id": 104, - "cfr": "CFR104", - "mmsi": "MMSI104", - "ircs": "IRCS104", - "external_immatriculation": "EXTIMM104", - "vessel_name": "DES BARS", - "flag_state": null, - "length": 15, - "under_charter": false - }, - - // - Vessel: CALAMARO - { - "id": 105, - "cfr": "CFR105", - "mmsi": "MMSI105", - "ircs": "IRCS105", - "external_immatriculation": "EXTIMM105", - "vessel_name": "CALAMARO", - "flag_state": "FR", - "length": 16, - "under_charter": false - }, - - // - Vessel: L'ANCRE SÈCHE - { - "id": 106, - "cfr": "CFR106", - "mmsi": "MMSI106", - "ircs": "IRCS106", - "external_immatriculation": "EXTIMM106", - "vessel_name": "L'ANCRE SÈCHE", - "flag_state": "FR", - "length": 7.5, - "under_charter": false - }, - - // - Vessel: MERLU L'ENCHANTEUR - { - "id": 107, - "cfr": "CFR107", - "mmsi": "MMSI107", - "ircs": "IRCS107", - "external_immatriculation": "EXTIMM107", - "vessel_name": "MERLU L'ENCHANTEUR", - "flag_state": "FR", - "length": 18, - "under_charter": false - }, - - // - Vessel: LE POISSON AMBULANT - { - "id": 108, - "cfr": "CFR108", - "mmsi": "MMSI108", - "ircs": "IRCS108", - "external_immatriculation": "EXTIMM108", - "vessel_name": "LE POISSON AMBULANT", - "flag_state": "FR", - "length": 9, - "under_charter": false - }, - - // - Vessel: LE POISSON D'AVRIL - // - DUPLICATE CFR (= 2 rows with same `cfr` value) - { - "id": 109, - "cfr": "CFR109", - "mmsi": "MMSI109", - "ircs": "IRCS109", - "external_immatriculation": "EXTIMM109", - "vessel_name": "LE POISSON D'AVRIL", - "flag_state": "FR", - "length": 25, - "under_charter": false - }, - // TODO Check that with Vincent, this breaks the prior notifications SQL query. - // { - // "id": 1109, - // "cfr": "CFR109", - // "mmsi": "MMSI109_DUPLICATE", - // "ircs": "IRCS109_DUPLICATE", - // "external_immatriculation": "EXTIMM109_DUPLICATE", - // "vessel_name": "LE POISSON D'AVRIL DUPLIQUÉ", - // "flag_state": "FR", - // "length": 50, - // "under_charter": true - // }, - - // - Vessel: LA MER À BOIRE - { - "id": 110, - "cfr": "CFR110", - "mmsi": "MMSI110", - "ircs": "IRCS110", - "external_immatriculation": "EXTIMM110", - "vessel_name": "LA MER À BOIRE", - "flag_state": "FR", - "length": 12.5, - "under_charter": false - }, - - // - Vessel: LE MARIN D'EAU DOUCE - { - "id": 111, - "cfr": "CFR111", - "mmsi": "MMSI111", - "ircs": "IRCS111", - "external_immatriculation": "EXTIMM111", - "vessel_name": "LE MARIN D'EAU DOUCE", - "flag_state": "FR", - "length": 9.5, - "under_charter": false - }, - - // - Vessel: POISSON PAS NET - { - "id": 112, - "cfr": "CFR112", - "mmsi": "MMSI112", - "ircs": "IRCS112", - "external_immatriculation": "EXTIMM112", - "vessel_name": "POISSON PAS NET", - "flag_state": "FR", - "length": 7.3, - "under_charter": false - }, - - // - Vessel: IN-ARÊTE-ABLE - { - "id": 113, - "cfr": "CFR113", - "mmsi": "MMSI113", - "ircs": "IRCS113", - "external_immatriculation": "EXTIMM113", - "vessel_name": "IN-ARÊTE-ABLE", - "flag_state": "FR", - "length": 8.5, - "under_charter": false - }, - - // - Vessel: DOS FIN - // - Flag state: BE - // - Under charter - { - "id": 115, - "cfr": "CFR115", - "mmsi": "MMSI115", - "ircs": "IRCS115", - "external_immatriculation": "EXTIMM115", - "vessel_name": "DOS FIN", - "flag_state": "BE", - "length": 9.2, - "under_charter": true - }, - - // - Vessel: NAVIRE RENOMMÉ (NOUVEAU NOM) - // - RENAMED VESSEL NAME - { - "id": 116, - "cfr": "CFR116", - "mmsi": "MMSI116", - "ircs": "IRCS116", - "external_immatriculation": "EXTIMM116", - "vessel_name": "NAVIRE RENOMMÉ (NOUVEAU NOM)", - "flag_state": "FR", - "length": 11.0, - "under_charter": false - }, - - // - Vessel: QUEUE DE POISSON - { - "id": 117, - "cfr": "CFR117", - "mmsi": "MMSI117", - "ircs": "IRCS117", - "external_immatriculation": "EXTIMM117", - "vessel_name": "QUEUE DE POISSON", - "flag_state": "FR", - "length": 10.9, - "under_charter": false - }, - - // - Vessel: GOUJON BOUGON - { - "id": 118, - "cfr": "CFR118", - "mmsi": "MMSI118", - "ircs": "IRCS118", - "external_immatriculation": "EXTIMM118", - "vessel_name": "GOUJON BOUGON", - "flag_state": "FR", - "length": 11.2, - "under_charter": false - }, - - // - Vessel: PAGEOT JO - { - "id": 119, - "cfr": "CFR119", - "mmsi": "MMSI119", - "ircs": "IRCS119", - "external_immatriculation": "EXTIMM119", - "vessel_name": "PAGEOT JO", - "flag_state": "FR", - "length": 11.1, - "under_charter": false - }, - - // - Vessel: VIVA L'ITALIA - // - Flag state: IT - { - "id": 120, - "cfr": "CFR120", - "mmsi": "MMSI120", - "ircs": "IRCS120", - "external_immatriculation": "EXTIMM120", - "vessel_name": "VIVA L'ITALIA", - "flag_state": "IT", - "length": 11.1, - "under_charter": false - }, - - // - Vessel: MARE ET BASS - { - "id": 121, - "cfr": "CFR121", - "mmsi": "MMSI121", - "ircs": "IRCS121", - "external_immatriculation": "EXTIMM121", - "vessel_name": "MARE ET BASS", - "flag_state": "FR", - "length": 7.7, - "under_charter": false - }, - - // - Vessel: FILET DOUX - { - "id": 122, - "cfr": "CFR122", - "mmsi": "MMSI122", - "ircs": "IRCS122", - "external_immatriculation": "EXTIMM122", - "vessel_name": "FILET DOUX", - "flag_state": "FR", - "length": 7.8, - "under_charter": false - }, - - // - Vessel: DÉVOILÉ - { - "id": 123, - "cfr": "CFR123", - "mmsi": "MMSI123", - "ircs": "IRCS123", - "external_immatriculation": "EXTIMM123", - "vessel_name": "DÉVOILÉ", - "flag_state": "FR", - "length": 7.9, - "under_charter": false - }, - - // - Vessel: MAT QUILLE - { - "id": 124, - "cfr": "CFR124", - "mmsi": "MMSI124", - "ircs": "IRCS124", - "external_immatriculation": "EXTIMM124", - "vessel_name": "MAT QUILLE", - "flag_state": "FR", - "length": 8.1, - "under_charter": false - }, - - // - Vessel: BEAU SÉANT - { - "id": 125, - "cfr": "CFR125", - "mmsi": "MMSI125", - "ircs": "IRCS125", - "external_immatriculation": "EXTIMM125", - "vessel_name": "BEAU SÉANT", - "flag_state": "FR", - "length": 8.2, - "under_charter": false - }, - - // - Vessel: THON BEAU - { - "id": 126, - "cfr": "CFR126", - "mmsi": "MMSI126", - "ircs": "IRCS126", - "external_immatriculation": "EXTIMM126", - "vessel_name": "THON BEAU", - "flag_state": "FR", - "length": 17.8, - "under_charter": false - }, - - // - Vessel: MILLE SABORDS - { - "id": 127, - "cfr": "CFR127", - "mmsi": "MMSI127", - "ircs": "IRCS127", - "external_immatriculation": "EXTIMM127", - "vessel_name": "MILLE SABORDS", - "flag_state": "FR", - "length": 16.9, - "under_charter": false - }, - - // - Vessel: THE FLOATING KANGAROO - // - Flag state: AU - { - "id": 128, - "cfr": "CFR128", - "mmsi": "MMSI128", - "ircs": "IRCS128", - "external_immatriculation": "EXTIMM128", - "vessel_name": "THE FLOATING KANGAROO", - "flag_state": "AU", - "length": 31.0, - "under_charter": false - }, - - // - Vessel: BON VENT - { - "id": 129, - "cfr": "CFR129", - "mmsi": "MMSI129", - "ircs": "IRCS129", - "external_immatriculation": "EXTIMM129", - "vessel_name": "BON VENT", - "flag_state": "FR", - "length": 34.5, - "under_charter": false - } - ] - } -] diff --git a/backend/src/main/resources/db/testdata/json/V666.2__Insert_dummy_vessels.jsonc b/backend/src/main/resources/db/testdata/json/V666.2__Insert_dummy_vessels.jsonc new file mode 100644 index 0000000000..221866afd4 --- /dev/null +++ b/backend/src/main/resources/db/testdata/json/V666.2__Insert_dummy_vessels.jsonc @@ -0,0 +1,831 @@ +[ + { + "table": "vessels", + "data": [ + // - Vessel: PHENOMENE + // - Flag state: FR + { + "id": 1, + "cfr": "FAK000999999", + "mmsi": "224103750", + "ircs": "CALLME", + "external_immatriculation": "DONTSINK", + "vessel_name": "PHENOMENE", + "flag_state": "FR", + "width": 5.0, + "length": 12.89, + "district": "Auray", + "district_code": "AY", + "gauge": 123, + "registry_port": "LORIENT", + "power": 127, + "vessel_type": "Pêche côtière", + "sailing_category": "3", + "sailing_type": "Pêche", + "declared_fishing_gears": ["SDN", "OTM"], + "nav_licence_expiration_date:sql": "CURRENT_DATE", + "operator_name": "LE PELETIER", + "operator_phones": ["+33 6 84 56 32 14"], + "operator_email": "lepeletier@gmail.com", + "proprietor_name": "EL MALIK", + "proprietor_phones": ["+33 6 45 25 14"], + "proprietor_emails": ["elmalik@gmail.com"], + "vessel_emails": null, + "vessel_phones": null, + "under_charter": false, + "has_esacapt": false, + "logbook_equipment_status": "Equipé" + }, + // - Vessel: MALOTRU + // - Flag state: X + { + "id": 2, + "cfr": "U_W0NTFINDME", + "mmsi": "ABC123456", + "ircs": "QGDF", + "external_immatriculation": "TALK2ME", + "vessel_name": "MALOTRU", + "flag_state": "X", + "width": 5.0, + "length": 12.89, + "district": "Auray", + "district_code": "AY", + "gauge": 123, + "registry_port": "LORIENT", + "power": 127, + "vessel_type": "Pêche côtière", + "sailing_category": "3", + "sailing_type": "Pêche", + "declared_fishing_gears": ["SDN", "OTM"], + "nav_licence_expiration_date:sql": "CURRENT_DATE", + "operator_name": "LE PELETIER", + "operator_phones": ["+33 6 84 56 32 14"], + "operator_email": "lepeletier@gmail.com", + "proprietor_name": "EL MALIK", + "proprietor_phones": ["+33 6 45 25 14"], + "proprietor_emails": ["elmalik@gmail.com"], + "vessel_emails": ["whatisyouremail@idontknow.anything"], + "vessel_phones": null, + "under_charter": true, + "has_esacapt": false, + "logbook_equipment_status": "Equipé" + }, + // - Vessel: LE b@TO + // - Flag state: FR + { + "id": 3, + "cfr": "FR263418260", + "mmsi": "224103750", + "ircs": "IR12A", + "external_immatriculation": "08FR65324", + "vessel_name": "LE b@TO", + "flag_state": "FR", + "width": 6.0, + "length": 14, + "district": "Lorient", + "district_code": "LT", + "gauge": 123, + "registry_port": "BREST", + "power": 237, + "vessel_type": "Pêche côtière", + "sailing_category": "3", + "sailing_type": "Pêche", + "declared_fishing_gears": ["SDN", "OTB", "LNB"], + "nav_licence_expiration_date:sql": "CURRENT_DATE", + "operator_name": "DUPOND", + "operator_phones": ["+33 6 84 56 32 14"], + "operator_email": "dupond@gmail.com", + "proprietor_name": "DURAND", + "proprietor_phones": ["+33 6 45 25 14"], + "proprietor_emails": ["durand@gmail.com"], + "vessel_emails": ["escogriffe@dgse.spy", "henri.duflot@dgse.spy"], + "vessel_phones": ["0918273645", "+33 6 00 00 00 00"], + "under_charter": true, + "has_esacapt": false, + "logbook_equipment_status": "Equipé" + }, + // - Vessel: NO NAME (ID 4) + // - Flag state: FR + { + "id": 4, + "cfr": "", + "mmsi": null, + "ircs": null, + "external_immatriculation": "", + "vessel_name": "NO NAME", + "flag_state": "FR", + "width": 6.0, + "length": 14, + "district": "Lorient", + "district_code": "LT", + "gauge": 123, + "registry_port": "BREST", + "power": 237, + "vessel_type": "Pêche côtière", + "sailing_category": "3", + "sailing_type": "Pêche", + "declared_fishing_gears": ["SDN", "OTB", "LNB"], + "nav_licence_expiration_date:sql": "CURRENT_DATE", + "operator_name": "DUPOND", + "operator_phones": ["+33 6 84 56 32 14"], + "operator_email": "dupond@gmail.com", + "proprietor_name": "DURAND", + "proprietor_phones": ["+33 6 45 25 14"], + "proprietor_emails": ["durand@gmail.com"], + "vessel_emails": ["escogriffe@dgse.spy", "henri.duflot@dgse.spy"], + "vessel_phones": ["0918273645", "+33 6 00 00 00 00"], + "under_charter": false, + "has_esacapt": false, + "logbook_equipment_status": "Equipé" + }, + // - Vessel: SOCRATE + // - Flag state: FR + { + "id": 5, + "cfr": "SOCR4T3", + "mmsi": null, + "ircs": "SCRT", + "external_immatriculation": "LePhiloFilou", + "vessel_name": "SOCRATE", + "flag_state": "FR", + "width": 4.0, + "length": 19.29, + "district": "Athènes", + "district_code": "AT", + "gauge": 293, + "registry_port": "ATHENES", + "power": 531, + "vessel_type": "Pêche et abricots", + "sailing_category": "4", + "sailing_type": "Pêche", + "declared_fishing_gears": ["PTM", "OTM"], + "nav_licence_expiration_date:sql": "CURRENT_DATE", + "operator_name": "PARTHENON PHISHING", + "operator_phones": ["+33 6 84 56 32 19"], + "operator_email": "parthenon@phishing.gr", + "proprietor_name": "ZEUS", + "proprietor_phones": ["+33 6 45 25 19"], + "proprietor_emails": ["zeus@phishing.gr"], + "vessel_emails": ["brossetoilesdents@email.diamant"], + "vessel_phones": null, + "under_charter": true, + "has_esacapt": false, + "logbook_equipment_status": "Equipé" + }, + // - Vessel: FRAIS AVIS MODE + // - Flag state: FR + { + "id": 6, + "cfr": "ABC000939217", + "mmsi": "", + "ircs": "SC6082", + "external_immatriculation": "RU460262", + "vessel_name": "FRAIS AVIS MODE", + "flag_state": "FR", + "width": 15.5, + "length": 7.6, + "district": "Auray", + "district_code": "AY", + "gauge": 130, + "registry_port": "LORIENT", + "power": 240, + "vessel_type": "Grande pêche", + "sailing_category": "3", + "sailing_type": "Transport", + "declared_fishing_gears": ["SDN", "OTM", "O3O"], + "nav_licence_expiration_date:sql": "CURRENT_DATE", + "operator_name": "DABADIE", + "operator_phones": ["+33 6 78 35 92 12"], + "operator_email": "dabadie@gmail.com", + "proprietor_name": "GARCIA", + "proprietor_phones": ["+33 6 32 57 09"], + "proprietor_emails": ["garcia@vessels.fr"], + "vessel_emails": ["email@fraisavismode.com"], + "vessel_phones": ["+33 6 75 23 10 12"], + "under_charter": true, + "has_esacapt": false, + "logbook_equipment_status": "Non Equipé" + }, + { + "id": 7, + "cfr": "ABC000717263", + "mmsi": null, + "ircs": "QP6933", + "external_immatriculation": "IG860866", + "vessel_name": "ÉCRASER TON IMPOSSIBLE", + "flag_state": "FR", + "width": 15.5, + "length": 7.6, + "district": "Auray", + "district_code": "AY", + "gauge": 123, + "registry_port": "LORIENT", + "power": 108, + "vessel_type": "Pêche côtière", + "sailing_category": "3", + "sailing_type": "Pêche", + "declared_fishing_gears": ["PTM", "OTM"], + "nav_licence_expiration_date:sql": "CURRENT_DATE", + "operator_name": "DUPOND", + "operator_phones": ["+33 6 84 56 32 14"], + "operator_email": "dupond@gmail.com", + "proprietor_name": "DURAND", + "proprietor_phones": ["+33 6 45 25 14"], + "proprietor_emails": ["durand@gmail.com"], + "vessel_emails": ["escogriffe@dgse.spy", "henri.duflot@dgse.spy"], + "vessel_phones": ["0918273645", "+33 6 00 00 00 00"], + "under_charter": true, + "has_esacapt": false, + "logbook_equipment_status": "Equipé" + }, + { + "id": 8, + "cfr": "ABC000480070", + "mmsi": null, + "ircs": "TR0588", + "external_immatriculation": "ZQ658496", + "vessel_name": "DURER REJETER RECONNAÎTRE", + "flag_state": "FR", + "width": 15.5, + "length": 7.6, + "district": "Auray", + "district_code": "AY", + "gauge": 130, + "registry_port": "LORIENT", + "power": 108, + "vessel_type": "Pêche côtière", + "sailing_category": "3", + "sailing_type": "Pêche", + "declared_fishing_gears": ["PTM", "OTM"], + "nav_licence_expiration_date:sql": "CURRENT_DATE", + "operator_name": "DUPOND", + "operator_phones": ["+33 6 84 56 32 14"], + "operator_email": "dupond@gmail.com", + "proprietor_name": "DURAND", + "proprietor_phones": ["+33 6 45 25 14"], + "proprietor_emails": ["durand@gmail.com"], + "vessel_emails": ["escogriffe@dgse.spy", "henri.duflot@dgse.spy"], + "vessel_phones": ["0918273645", "+33 6 00 00 00 00"], + "under_charter": true, + "has_esacapt": false, + "logbook_equipment_status": "Equipé" + }, + { + "id": 9, + "cfr": "ABC000640738", + "mmsi": null, + "ircs": "IJU5217", + "external_immatriculation": "EJ600773", + "vessel_name": "PROFITER ESPRIT DEPUIS", + "flag_state": "FR", + "width": 15.5, + "length": 7.6, + "district": "Auray", + "district_code": "AY", + "gauge": 123, + "registry_port": "LORIENT", + "power": 108, + "vessel_type": "Pêche côtière", + "sailing_category": "3", + "sailing_type": "Pêche", + "declared_fishing_gears": ["PTM", "OTM"], + "nav_licence_expiration_date:sql": "CURRENT_DATE", + "operator_name": "DUPOND", + "operator_phones": ["+33 6 84 56 32 14"], + "operator_email": "dupond@gmail.com", + "proprietor_name": "DURAND", + "proprietor_phones": ["+33 6 45 25 14"], + "proprietor_emails": ["durand@gmail.com"], + "vessel_emails": ["escogriffe@dgse.spy", "henri.duflot@dgse.spy"], + "vessel_phones": ["0918273645", "+33 6 00 00 00 00"], + "under_charter": true, + "has_esacapt": false, + "logbook_equipment_status": "Equipé" + }, + { + "id": 10, + "cfr": "ABC000042310", + "mmsi": null, + "ircs": "IW783219", + "external_immatriculation": "QD0506", + "vessel_name": "COURANT MAIN PROFESSEUR", + "flag_state": "FR", + "width": 12.5, + "length": 7.6, + "district": "Lorient", + "district_code": "LO", + "gauge": 105, + "registry_port": "LORIENT", + "power": 108, + "vessel_type": "Pêche côtière", + "sailing_category": "3", + "sailing_type": "Pêche", + "declared_fishing_gears": ["PTM", "OTM"], + "nav_licence_expiration_date:sql": "CURRENT_DATE + INTERVAL '2 days'", + "operator_name": "DUPOND", + "operator_phones": ["+33 6 84 56 32 14"], + "operator_email": "dupond@gmail.com", + "proprietor_name": "DURAND", + "proprietor_phones": ["+33 6 45 25 14"], + "proprietor_emails": ["durand@gmail.com"], + "vessel_emails": ["escogriffe@dgse.spy", "henri.duflot@dgse.spy"], + "vessel_phones": ["0918273645", "+33 6 00 00 00 00"], + "under_charter": true, + "has_esacapt": false, + "logbook_equipment_status": "Equipé" + }, + { + "id": 11, + "cfr": "ABC000597493", + "mmsi": null, + "ircs": "JL026591", + "external_immatriculation": "CMQ7994", + "vessel_name": "RENCONTRER VEILLER APPARTEMENT", + "flag_state": "FR", + "width": 15.5, + "length": 7.6, + "district": "Auray", + "district_code": "AY", + "gauge": 123, + "registry_port": "LORIENT", + "power": 108, + "vessel_type": "Pêche côtière", + "sailing_category": "3", + "sailing_type": "Pêche", + "declared_fishing_gears": ["PTM", "OTM"], + "nav_licence_expiration_date:sql": "CURRENT_DATE + INTERVAL '5 days'", + "operator_name": "DUPOND", + "operator_phones": ["+33 6 84 56 32 14"], + "operator_email": "dupond@gmail.com", + "proprietor_name": "DURAND", + "proprietor_phones": ["+33 6 45 25 14"], + "proprietor_emails": ["durand@gmail.com"], + "vessel_emails": ["escogriffe@dgse.spy", "henri.duflot@dgse.spy"], + "vessel_phones": ["0918273645", "+33 6 00 00 00 00"], + "under_charter": true, + "has_esacapt": false, + "logbook_equipment_status": "Equipé" + }, + { + "id": 12, + "cfr": "FR263465414", + "mmsi": "", + "ircs": "IR123", + "external_immatriculation": "08FR65465", + "vessel_name": "LE b@TO 2", + "flag_state": "FR", + "width": 15.5, + "length": 7.6, + "district": "Auray", + "district_code": "AY", + "gauge": 123, + "registry_port": "LORIENT", + "power": 108, + "vessel_type": "Pêche côtière", + "sailing_category": "3", + "sailing_type": "Pêche", + "declared_fishing_gears": ["PTM", "OTM"], + "nav_licence_expiration_date:sql": "CURRENT_DATE + INTERVAL '5 days'", + "operator_name": "DUPOND", + "operator_phones": ["+33 6 84 56 32 14"], + "operator_email": "dupond@gmail.com", + "proprietor_name": "DURAND", + "proprietor_phones": ["+33 6 45 25 14"], + "proprietor_emails": ["durand@gmail.com"], + "vessel_emails": ["escogriffe@dgse.spy", "henri.duflot@dgse.spy"], + "vessel_phones": ["0918273645", "+33 6 00 00 00 00"], + "under_charter": true, + "has_esacapt": false, + "logbook_equipment_status": "Equipé" + }, + { + "id": 13, + "cfr": "FR263454484", + "mmsi": "", + "ircs": "FE4864", + "external_immatriculation": "8FR6541", + "vessel_name": "NO NAME", + "flag_state": "FR", + "width": 15.5, + "length": 7.6, + "district": "Auray", + "district_code": "AY", + "gauge": 123, + "registry_port": "LORIENT", + "power": 108, + "vessel_type": "Pêche côtière", + "sailing_category": "3", + "sailing_type": "Pêche", + "declared_fishing_gears": ["PTM", "OTM"], + "nav_licence_expiration_date:sql": "CURRENT_DATE + INTERVAL '5 days'", + "operator_name": "DUPOND", + "operator_phones": ["+33 6 84 56 32 14"], + "operator_email": "dupond@gmail.com", + "proprietor_name": "DURAND", + "proprietor_phones": ["+33 6 45 25 14"], + "proprietor_emails": ["durand@gmail.com"], + "vessel_emails": ["escogriffe@dgse.spy", "henri.duflot@dgse.spy"], + "vessel_phones": ["0918273645", "+33 6 00 00 00 00"], + "under_charter": true, + "has_esacapt": false, + "logbook_equipment_status": "Equipé" + }, + // - Vessel: UNKNOWN + { + "id": -1, + "cfr": "UNKNOWN", + "ircs": "UNKNOWN", + "external_immatriculation": "UNKNOWN", + "vessel_name": "UNKNOWN" + }, + + // - Vessel: VIVA ESPANA + // - Flag state: ES + // - Under charter + { + "id": 101, + "cfr": "CFR101", + "mmsi": "MMSI101", + "ircs": "IRCS101", + "external_immatriculation": "EXTIMM101", + "vessel_name": "VIVA ESPANA", + "flag_state": "ES", + "length": 15, + "under_charter": true + }, + + // - Vessel: LEVE NEDERLAND + // - Flag state: NL + // - Under charter + { + "id": 102, + "cfr": "CFR102", + "mmsi": "MMSI102", + "ircs": "IRCS102", + "external_immatriculation": "EXTIMM102", + "vessel_name": "LEVE NEDERLAND", + "flag_state": "NL", + "length": 20, + "under_charter": true + }, + + // - Vessel: L'OM DU POISSON + // - Under charter + { + "id": 103, + "cfr": "CFR103", + "mmsi": "MMSI103", + "ircs": "IRCS103", + "external_immatriculation": "EXTIMM103", + "vessel_name": "L'OM DU POISSON", + "flag_state": "FR", + "length": 11.99, + "under_charter": true + }, + + // - Vessel: DES BARS + // - Flag state: Unknown + { + "id": 104, + "cfr": "CFR104", + "mmsi": "MMSI104", + "ircs": "IRCS104", + "external_immatriculation": "EXTIMM104", + "vessel_name": "DES BARS", + "flag_state": null, + "length": 15, + "under_charter": false + }, + + // - Vessel: CALAMARO + { + "id": 105, + "cfr": "CFR105", + "mmsi": "MMSI105", + "ircs": "IRCS105", + "external_immatriculation": "EXTIMM105", + "vessel_name": "CALAMARO", + "flag_state": "FR", + "length": 16, + "under_charter": false + }, + + // - Vessel: L'ANCRE SÈCHE + { + "id": 106, + "cfr": "CFR106", + "mmsi": "MMSI106", + "ircs": "IRCS106", + "external_immatriculation": "EXTIMM106", + "vessel_name": "L'ANCRE SÈCHE", + "flag_state": "FR", + "length": 7.5, + "under_charter": false + }, + + // - Vessel: MERLU L'ENCHANTEUR + { + "id": 107, + "cfr": "CFR107", + "mmsi": "MMSI107", + "ircs": "IRCS107", + "external_immatriculation": "EXTIMM107", + "vessel_name": "MERLU L'ENCHANTEUR", + "flag_state": "FR", + "length": 18, + "under_charter": false + }, + + // - Vessel: LE POISSON AMBULANT + { + "id": 108, + "cfr": "CFR108", + "mmsi": "MMSI108", + "ircs": "IRCS108", + "external_immatriculation": "EXTIMM108", + "vessel_name": "LE POISSON AMBULANT", + "flag_state": "FR", + "length": 9, + "under_charter": false + }, + + // - Vessel: LE POISSON D'AVRIL + // - DUPLICATE CFR (= 2 rows with same `cfr` value) + { + "id": 109, + "cfr": "CFR109", + "mmsi": "MMSI109", + "ircs": "IRCS109", + "external_immatriculation": "EXTIMM109", + "vessel_name": "LE POISSON D'AVRIL", + "flag_state": "FR", + "length": 25, + "under_charter": false + }, + // TODO Check that with Vincent, this breaks the prior notifications SQL query. + // { + // "id": 1109, + // "cfr": "CFR109", + // "mmsi": "MMSI109_DUPLICATE", + // "ircs": "IRCS109_DUPLICATE", + // "external_immatriculation": "EXTIMM109_DUPLICATE", + // "vessel_name": "LE POISSON D'AVRIL DUPLIQUÉ", + // "flag_state": "FR", + // "length": 50, + // "under_charter": true + // }, + + // - Vessel: LA MER À BOIRE + { + "id": 110, + "cfr": "CFR110", + "mmsi": "MMSI110", + "ircs": "IRCS110", + "external_immatriculation": "EXTIMM110", + "vessel_name": "LA MER À BOIRE", + "flag_state": "FR", + "length": 12.5, + "under_charter": false + }, + + // - Vessel: LE MARIN D'EAU DOUCE + { + "id": 111, + "cfr": "CFR111", + "mmsi": "MMSI111", + "ircs": "IRCS111", + "external_immatriculation": "EXTIMM111", + "vessel_name": "LE MARIN D'EAU DOUCE", + "flag_state": "FR", + "length": 9.5, + "under_charter": false + }, + + // - Vessel: POISSON PAS NET + { + "id": 112, + "cfr": "CFR112", + "mmsi": "MMSI112", + "ircs": "IRCS112", + "external_immatriculation": "EXTIMM112", + "vessel_name": "POISSON PAS NET", + "flag_state": "FR", + "length": 7.3, + "under_charter": false + }, + + // - Vessel: IN-ARÊTE-ABLE + { + "id": 113, + "cfr": "CFR113", + "mmsi": "MMSI113", + "ircs": "IRCS113", + "external_immatriculation": "EXTIMM113", + "vessel_name": "IN-ARÊTE-ABLE", + "flag_state": "FR", + "length": 8.5, + "under_charter": false + }, + + // - Vessel: DOS FIN + // - Flag state: BE + // - Under charter + { + "id": 115, + "cfr": "CFR115", + "mmsi": "MMSI115", + "ircs": "IRCS115", + "external_immatriculation": "EXTIMM115", + "vessel_name": "DOS FIN", + "flag_state": "BE", + "length": 9.2, + "under_charter": true + }, + + // - Vessel: NAVIRE RENOMMÉ (NOUVEAU NOM) + // - RENAMED VESSEL NAME + { + "id": 116, + "cfr": "CFR116", + "mmsi": "MMSI116", + "ircs": "IRCS116", + "external_immatriculation": "EXTIMM116", + "vessel_name": "NAVIRE RENOMMÉ (NOUVEAU NOM)", + "flag_state": "FR", + "length": 11.0, + "under_charter": false + }, + + // - Vessel: QUEUE DE POISSON + { + "id": 117, + "cfr": "CFR117", + "mmsi": "MMSI117", + "ircs": "IRCS117", + "external_immatriculation": "EXTIMM117", + "vessel_name": "QUEUE DE POISSON", + "flag_state": "FR", + "length": 10.9, + "under_charter": false + }, + + // - Vessel: GOUJON BOUGON + { + "id": 118, + "cfr": "CFR118", + "mmsi": "MMSI118", + "ircs": "IRCS118", + "external_immatriculation": "EXTIMM118", + "vessel_name": "GOUJON BOUGON", + "flag_state": "FR", + "length": 11.2, + "under_charter": false + }, + + // - Vessel: PAGEOT JO + { + "id": 119, + "cfr": "CFR119", + "mmsi": "MMSI119", + "ircs": "IRCS119", + "external_immatriculation": "EXTIMM119", + "vessel_name": "PAGEOT JO", + "flag_state": "FR", + "length": 11.1, + "under_charter": false + }, + + // - Vessel: VIVA L'ITALIA + // - Flag state: IT + { + "id": 120, + "cfr": "CFR120", + "mmsi": "MMSI120", + "ircs": "IRCS120", + "external_immatriculation": "EXTIMM120", + "vessel_name": "VIVA L'ITALIA", + "flag_state": "IT", + "length": 11.1, + "under_charter": false + }, + + // - Vessel: MARE ET BASS + { + "id": 121, + "cfr": "CFR121", + "mmsi": "MMSI121", + "ircs": "IRCS121", + "external_immatriculation": "EXTIMM121", + "vessel_name": "MARE ET BASS", + "flag_state": "FR", + "length": 7.7, + "under_charter": false + }, + + // - Vessel: FILET DOUX + { + "id": 122, + "cfr": "CFR122", + "mmsi": "MMSI122", + "ircs": "IRCS122", + "external_immatriculation": "EXTIMM122", + "vessel_name": "FILET DOUX", + "flag_state": "FR", + "length": 7.8, + "under_charter": false + }, + + // - Vessel: DÉVOILÉ + { + "id": 123, + "cfr": "CFR123", + "mmsi": "MMSI123", + "ircs": "IRCS123", + "external_immatriculation": "EXTIMM123", + "vessel_name": "DÉVOILÉ", + "flag_state": "FR", + "length": 7.9, + "under_charter": false + }, + + // - Vessel: MAT QUILLE + { + "id": 124, + "cfr": "CFR124", + "mmsi": "MMSI124", + "ircs": "IRCS124", + "external_immatriculation": "EXTIMM124", + "vessel_name": "MAT QUILLE", + "flag_state": "FR", + "length": 8.1, + "under_charter": false + }, + + // - Vessel: BEAU SÉANT + { + "id": 125, + "cfr": "CFR125", + "mmsi": "MMSI125", + "ircs": "IRCS125", + "external_immatriculation": "EXTIMM125", + "vessel_name": "BEAU SÉANT", + "flag_state": "FR", + "length": 8.2, + "under_charter": false + }, + + // - Vessel: THON BEAU + { + "id": 126, + "cfr": "CFR126", + "mmsi": "MMSI126", + "ircs": "IRCS126", + "external_immatriculation": "EXTIMM126", + "vessel_name": "THON BEAU", + "flag_state": "FR", + "length": 17.8, + "under_charter": false + }, + + // - Vessel: MILLE SABORDS + { + "id": 127, + "cfr": "CFR127", + "mmsi": "MMSI127", + "ircs": "IRCS127", + "external_immatriculation": "EXTIMM127", + "vessel_name": "MILLE SABORDS", + "flag_state": "FR", + "length": 16.9, + "under_charter": false + }, + + // - Vessel: THE FLOATING KANGAROO + // - Flag state: AU + { + "id": 128, + "cfr": "CFR128", + "mmsi": "MMSI128", + "ircs": "IRCS128", + "external_immatriculation": "EXTIMM128", + "vessel_name": "THE FLOATING KANGAROO", + "flag_state": "AU", + "length": 31.0, + "under_charter": false + }, + + // - Vessel: BON VENT + { + "id": 129, + "cfr": "CFR129", + "mmsi": "MMSI129", + "ircs": "IRCS129", + "external_immatriculation": "EXTIMM129", + "vessel_name": "BON VENT", + "flag_state": "FR", + "length": 34.5, + "under_charter": false + } + ] + } +] diff --git a/frontend/scripts/generate_test_data_seeds.js b/frontend/scripts/generate_test_data_seeds.js index 7b1807a9c3..c2ecfc6af8 100644 --- a/frontend/scripts/generate_test_data_seeds.js +++ b/frontend/scripts/generate_test_data_seeds.js @@ -137,7 +137,7 @@ for (const file of jsonFiles) { const sqlSource = [ `-- /!\\ This file is automatically generated by a local script.`, - `-- Do NOT update it directly, update the associated .jsonc file in /backend/src/main/resources/db/testdata/json/.`, + `-- Do NOT update it directly, update the associated .jsonc file in /backend/src/main/resources/db/testdata/json/ and execute 'make generate-test-data'.`, '', ...sqlStatementBlocks ].join('\n')