Skip to content

Commit

Permalink
Update test data sql files
Browse files Browse the repository at this point in the history
  • Loading branch information
louptheron committed Sep 18, 2024
1 parent 534336c commit 3d307b2
Show file tree
Hide file tree
Showing 14 changed files with 1,288 additions and 736 deletions.
Original file line number Diff line number Diff line change
@@ -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}]');

Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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));
Loading

0 comments on commit 3d307b2

Please sign in to comment.