From 1c7a02c66b1b09642d6d69e2af6460bb7bde66b1 Mon Sep 17 00:00:00 2001 From: Tom Reed Date: Tue, 21 Nov 2023 10:31:24 +0000 Subject: [PATCH] PO-40-add-dummy-data-insert-scripts (#52) --- .../migration/V20231113_005__insert_notes.sql | 34 +++++++++++ ..._007__insert_sample_defendant_accounts.sql | 60 +++++++++++++++++++ 2 files changed, 94 insertions(+) create mode 100644 src/main/resources/db/migration/V20231113_005__insert_notes.sql create mode 100644 src/main/resources/db/migration/V20231117_007__insert_sample_defendant_accounts.sql diff --git a/src/main/resources/db/migration/V20231113_005__insert_notes.sql b/src/main/resources/db/migration/V20231113_005__insert_notes.sql new file mode 100644 index 000000000..94ae43495 --- /dev/null +++ b/src/main/resources/db/migration/V20231113_005__insert_notes.sql @@ -0,0 +1,34 @@ +/** +* OPAL Program +* +* MODULE : insert_notes.sql +* +* DESCRIPTION : Inserts one row of data into the NOTES table. +* +* VERSION HISTORY: +* +* Date Author Version Nature of Change +* ---------- ------- -------- --------------------------------------------------------------------------------------------------------- +* 13/11/2023 A Dennis 1.0 Inserts one row of data into the NOTES table +* +**/ +INSERT INTO NOTES + ( + note_id + ,note_type + ,associated_record_type + ,associated_record_id + ,note_text + ,posted_date + ,posted_by + ) +VALUES + ( + nextval('note_id_seq') + ,'AC' + ,'BBBBB' + ,'CCCCCCCCCC' + ,'DDDDD EEEEE FFFFFF' + ,current_timestamp + ,'DDDDDDDDDDDDDD' + ); diff --git a/src/main/resources/db/migration/V20231117_007__insert_sample_defendant_accounts.sql b/src/main/resources/db/migration/V20231117_007__insert_sample_defendant_accounts.sql new file mode 100644 index 000000000..07ec0ee27 --- /dev/null +++ b/src/main/resources/db/migration/V20231117_007__insert_sample_defendant_accounts.sql @@ -0,0 +1,60 @@ +/** +* OPAL Program +* +* MODULE : insert_notes.sql +* +* DESCRIPTION : Inserts two rows of data into the DEFENDANT_ACCOUNTS table. +* +* VERSION HISTORY: +* +* Date Author Version Nature of Change +* ---------- ------- -------- --------------------------------------------------------------------------------------------------------- +* 17/11/2023 T REED 1.0 Inserts two rows of data into the DEFENDANT_ACCOUNTS table +* +**/ + +INSERT INTO defendant_accounts ( + defendant_account_id, + business_unit_id, + account_number, + imposed_hearing_date, + imposing_court_id, + amount_imposed, + amount_paid, + account_balance, + account_status, + completed_date, + enforcing_court_id, + last_hearing_court_id, + last_hearing_date, + last_movement_date, + last_enforcement, + last_changed_date, + originator_name, + originator_reference, + originator_type, + allow_writeoffs, + allow_cheques, + cheque_clearance_period, + credit_transfer_clearance_period, + enforcement_override_result_id, + enforcement_override_enforcer_id, + enforcement_override_tfo_lja_id, + unit_fine_detail, + unit_fine_value, + collection_order, + collection_order_effective_date, + further_steps_notice_date, + confiscation_order_date, + fine_registration_date, + suspended_committal_enforcement_id, + consolidated_account_type, + payment_card_requested, + payment_card_requested_date, + payment_card_requested_by, + prosecutor_case_reference, + enforcement_case_status +) +VALUES + (nextval('defendant_account_id_seq'), 1, 'TESTDATA123', '2023-11-09 00:00:00', 1, 500.00, 100.00, 400.00, 'L', '2023-12-09 00:00:00', 1, 1, '2023-11-09 00:00:00', '2023-11-09 00:00:00', 'ENF001', '2023-11-09 00:00:00', 'Court Name', 'Ref123', 'Type1', TRUE, TRUE, 7, 7, 'OVR001', 1, 1, 'Fine Details', 50.00, TRUE, '2023-11-09 00:00:00', '2023-11-09 00:00:00', '2023-11-09 00:00:00', '2023-11-09 00:00:00', 1, 'M', FALSE, '2023-11-09 00:00:00', 'User123', 'CaseRef123', 'Active'), + (nextval('defendant_account_id_seq'), 2, 'TESTDATA456', '2023-11-10 00:00:00', 2, 1000.00, 200.00, 800.00, 'L', '2023-12-10 00:00:00', 2, 2, '2023-11-10 00:00:00', '2023-11-10 00:00:00', 'ENF002', '2023-11-10 00:00:00', 'Another Court', 'Ref456', 'Type2', TRUE, TRUE, 7, 7, 'OVR002', 2, 2, 'More Fine Details', 100.00, TRUE, '2023-11-10 00:00:00', '2023-11-10 00:00:00', '2023-11-10 00:00:00', '2023-11-10 00:00:00', 2, 'C', TRUE, '2023-11-10 00:00:00', 'User456', 'CaseRef456', 'Pending');