diff --git a/src/main/resources/data-local.sql b/src/main/resources/data-local.sql index 571e8649..376d0ece 100644 --- a/src/main/resources/data-local.sql +++ b/src/main/resources/data-local.sql @@ -29,17 +29,24 @@ VALUES ('urn:fdc:gov.uk:2022:ABCDE', '07712345678', '01/01/00', '09/13/24', '09/ INSERT INTO local_authority (id, name, created_date, last_modified_date) VALUES (1, 'Betelgeuse', '09/13/24', '09/13/24'); -INSERT INTO local_authority_user (subject_identifier, is_manager, local_authority_id, created_date, last_modified_date, name, email) +SELECT setval(pg_get_serial_sequence('local_authority', 'id'), (SELECT MAX(id) FROM local_authority)); + +INSERT INTO local_authority_user (subject_identifier, is_manager, local_authority_id, created_date, last_modified_date, + name, email) VALUES ('urn:fdc:gov.uk:2022:KLMNO', true, 1, '10/07/24', '10/07/24', 'Ford Prefect', 'Ford.Prefect@la.com'), - ('urn:fdc:gov.uk:2022:UVWXY', true, 1, '10/14/24', '10/14/24','Mock User', 'test@la.com'), - ('urn:fdc:gov.uk:2022:PQRST', false, 1, '10/09/24', '10/09/24','Arthur Dent', 'Arthur.Dent@la.com'), - ('urn:fdc:gov.uk:2022:07lXHJeQwE0k5PZO7w_PQF425vT8T7e63MrvyPYNSoI', true, 1, '10/09/24', '10/09/24', 'Jasmin Conterio', + ('urn:fdc:gov.uk:2022:UVWXY', true, 1, '10/14/24', '10/14/24', 'Mock User', 'test@la.com'), + ('urn:fdc:gov.uk:2022:PQRST', false, 1, '10/09/24', '10/09/24', 'Arthur Dent', 'Arthur.Dent@la.com'), + ('urn:fdc:gov.uk:2022:07lXHJeQwE0k5PZO7w_PQF425vT8T7e63MrvyPYNSoI', true, 1, '10/09/24', '10/09/24', + 'Jasmin Conterio', 'jasmin.conterio@softwire.com'), - ('urn:fdc:gov.uk:2022:mwfvbb5GgiDh0acjz9EDDQ7zwskWZzUSnWfavL70f6s', true, 1, '10/02/24', '10/02/24', 'Isobel Ibironke', + ('urn:fdc:gov.uk:2022:mwfvbb5GgiDh0acjz9EDDQ7zwskWZzUSnWfavL70f6s', true, 1, '10/02/24', '10/02/24', + 'Isobel Ibironke', 'isobel.ibironke@softwire.com'), - ('urn:fdc:gov.uk:2022:n93slCXHsxJ9rU6-AFM0jFIctYQjYf0KN9YVuJT-cao', true, 1, '10/15/24', '10/15/24', 'PRSDB LA Admin', + ('urn:fdc:gov.uk:2022:n93slCXHsxJ9rU6-AFM0jFIctYQjYf0KN9YVuJT-cao', true, 1, '10/15/24', '10/15/24', + 'PRSDB LA Admin', 'Team-PRSDB+laadmin@softwire.com'), - ('urn:fdc:gov.uk:2022:cgVX2oJWKHMwzm8Gzx25CSoVXixVS0rw32Sar4Om8vQ', false, 1, '10/15/24', '10/15/24', 'PRSDB La User', + ('urn:fdc:gov.uk:2022:cgVX2oJWKHMwzm8Gzx25CSoVXixVS0rw32Sar4Om8vQ', false, 1, '10/15/24', '10/15/24', + 'PRSDB La User', 'Team-PRSDB+lauser@softwire.com'); INSERT INTO local_authority_invitation (invited_email, inviting_authority_id, token) @@ -49,22 +56,35 @@ VALUES ('invited.user@example.com', 1, gen_random_uuid()), ('another.user@example.com', 1, gen_random_uuid()); INSERT INTO registration_number (id, created_date, number, type) -VALUES (1, '09/13/24', 2001001001, 1), +VALUES (1, '09/13/24', 2001001001, 1), (2, '09/13/24', 3002001002, 1), (3, '10/07/24', 4003001003, 1), (4, '10/14/24', 5004001004, 1), (5, '10/09/24', 6005001005, 1); +SELECT setval(pg_get_serial_sequence('registration_number', 'id'), (SELECT MAX(id) FROM registration_number)); + INSERT INTO address (id, created_date, last_modified_date, uprn, single_line_address) -VALUES (1, '09/13/24', '09/13/24', 1, '1 Fictional Road'), - (2, '09/13/24', '09/13/24', 2, '2 Fake Way'), - (3, '09/13/24', '09/13/24', 3, '3 Imaginary Street'), - (4, '09/13/24', '09/13/24', 4, '4 Pretend Crescent'), - (5, '09/13/24', '09/13/24', 5, '5 Mythical Place'); +VALUES (1, '09/13/24', '09/13/24', 1, '1 Fictional Road'), + (2, '09/13/24', '09/13/24', 2, '2 Fake Way'), + (3, '09/13/24', '09/13/24', 3, '3 Imaginary Street'), + (4, '09/13/24', '09/13/24', 4, '4 Pretend Crescent'), + (5, '09/13/24', '09/13/24', 5, '5 Mythical Place'); + +SELECT setval(pg_get_serial_sequence('address', 'id'), (SELECT MAX(id) FROM address)); + +INSERT INTO landlord (id, created_date, last_modified_date, registration_number_id, address_id, date_of_birth, + is_active, phone_number, subject_identifier, name, email) +VALUES (1, '09/13/24', '09/13/24', 1, 1, '09/13/2000', true, 07111111111, 'urn:fdc:gov.uk:2022:KLMNO', + 'Alexander Smith', 'alex.surname@example.com'), + (2, '09/13/24', '09/13/24', 2, 2, '08/13/2001', true, 07111111111, 'urn:fdc:gov.uk:2022:ABCDE', + 'Alexandra Davies', 'alexandra.q.davies@example.com'), + (3, '09/13/24', '09/13/24', 3, 3, '07/13/1997', true, 07111111111, 'urn:fdc:gov.uk:2022:PQRST', + 'Evan Alexandrescu', 'unrelatedemail@completelydifferentdomain.com'), + (4, '09/13/24', '09/13/24', 4, 4, '06/13/1989', true, 07111111111, + 'urn:fdc:gov.uk:2022:07lXHJeQwE0k5PZO7w_PQF425vT8T7e63MrvyPYNSoI', 'Tobias Evans', 'tobyevans@importantco.com'), + (5, '09/13/24', '09/13/24', 5, 5, '05/13/1950', true, 07111111111, + 'urn:fdc:gov.uk:2022:mwfvbb5GgiDh0acjz9EDDQ7zwskWZzUSnWfavL70f6s', 'Margaret Mary Smith', + 'mm.smith@importantco.com'); -INSERT INTO landlord (id, created_date, last_modified_date, registration_number_id, address_id, date_of_birth, is_active, phone_number, subject_identifier, name, email) -VALUES (1, '09/13/24', '09/13/24', 1, 1,'09/13/2000', true, 07111111111, 'urn:fdc:gov.uk:2022:KLMNO', 'Alexander Smith', 'alex.surname@example.com'), - (2, '09/13/24', '09/13/24', 2, 2,'08/13/2001', true, 07111111111, 'urn:fdc:gov.uk:2022:UVWXY', 'Alexandra Davies', 'alexandra.q.davies@example.com'), - (3, '09/13/24', '09/13/24', 3, 3,'07/13/1997', true, 07111111111, 'urn:fdc:gov.uk:2022:PQRST', 'Evan Alexandrescu', 'unrelatedemail@completelydifferentdomain.com'), - (4, '09/13/24', '09/13/24', 4, 4,'06/13/1989', true, 07111111111, 'urn:fdc:gov.uk:2022:07lXHJeQwE0k5PZO7w_PQF425vT8T7e63MrvyPYNSoI', 'Tobias Evans', 'tobyevans@importantco.com'), - (5, '09/13/24', '09/13/24', 5, 5,'05/13/1950', true, 07111111111, 'urn:fdc:gov.uk:2022:mwfvbb5GgiDh0acjz9EDDQ7zwskWZzUSnWfavL70f6s', 'Margaret Mary Smith', 'mm.smith@importantco.com'); \ No newline at end of file +SELECT setval(pg_get_serial_sequence('landlord', 'id'), (SELECT MAX(id) FROM landlord)); \ No newline at end of file