diff --git a/bc_obps/Makefile b/bc_obps/Makefile index 3f08fa97df..895300026d 100644 --- a/bc_obps/Makefile +++ b/bc_obps/Makefile @@ -92,7 +92,7 @@ superuser: ## create a superuser superuser: $(POETRY_RUN) python $(MANAGE_PY) create_superuser -loadfixtures_v1: ## add all registration fixture files to the db +loadfixtures_v1: ## add all registration v1 fixture files to the db loadfixtures_v1: $(POETRY_RUN) python $(MANAGE_PY) load_fixtures_v1 $(ARGS) $(POETRY_RUN) python $(MANAGE_PY) load_reporting_fixtures $(ARGS) diff --git a/bc_obps/common/management/commands/load_fixtures_v1.py b/bc_obps/common/management/commands/load_fixtures_v1.py index 4c8c4f4730..0a1e734360 100644 --- a/bc_obps/common/management/commands/load_fixtures_v1.py +++ b/bc_obps/common/management/commands/load_fixtures_v1.py @@ -21,13 +21,6 @@ def handle(self, *args, **options): f'{fixture_base_dir}/multiple_operator.json', f'{fixture_base_dir}/document.json', f'{fixture_base_dir}/user_operator.json', - f'{fixture_base_dir}/facility.json', - f'{fixture_base_dir}/facility_designated_operation_timeline.json', - f'{fixture_base_dir}/operation_designated_operator_timeline.json', - f'{fixture_base_dir}/restart_event.json', - f'{fixture_base_dir}/closure_event.json', - f'{fixture_base_dir}/temporary_shutdown_event.json', - f'{fixture_base_dir}/transfer_event.json', f'{fixture_base_dir}/parent_operator.json', f'{fixture_base_dir}/partner_operator.json', ] diff --git a/bc_obps/registration/fixtures/mock/v1/closure_event.json b/bc_obps/registration/fixtures/mock/v1/closure_event.json deleted file mode 100644 index 7f0710ff55..0000000000 --- a/bc_obps/registration/fixtures/mock/v1/closure_event.json +++ /dev/null @@ -1,27 +0,0 @@ -[ - { - "model": "registration.closureevent", - "pk": "87a669d0-66d4-47a2-9c2c-34c9e60740d0", - "fields": { - "created_by": "ba2ba62a121842e0942aab9e92ce8822", - "created_at": "2024-06-05T23:25:37.892Z", - "operation": "3b5b95ea-2a1a-450d-8e2e-2e15feed96c9", - "effective_date": "2024-09-01T09:00:00Z", - "description": "Homer Simpson burned the entire nuclear reactor down" - } - }, - { - "model": "registration.closureevent", - "pk": "127ccfbf-c344-4dcd-8c98-bbd9303d22a9", - "fields": { - "created_by": "00000000-0000-0000-0000-000000000001", - "created_at": "2024-08-20T18:23:08.327Z", - "effective_date": "2026-01-10T09:00:00Z", - "facilities": [ - "459b80f9-b5f3-48aa-9727-90c30eaf3a58", - "f486f2fb-62ed-438d-bb3e-0819b51e3aeb" - ], - "description": "" - } - } -] diff --git a/bc_obps/registration/fixtures/mock/v1/facility.json b/bc_obps/registration/fixtures/mock/v1/facility.json deleted file mode 100644 index 43202c8b01..0000000000 --- a/bc_obps/registration/fixtures/mock/v1/facility.json +++ /dev/null @@ -1,338 +0,0 @@ -[ - { - "model": "registration.facility", - "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3aeb", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:18:07.664Z", - "name": "Facility 1", - "type": "Large Facility", - "latitude_of_largest_emissions": 43.5, - "longitude_of_largest_emissions": -123.5 - } - }, - { - "model": "registration.facility", - "pk": "459b80f9-b5f3-48aa-9727-90c30eaf3a58", - "fields": { - "created_by": "00000000-0000-0000-0000-000000000001", - "created_at": "2024-06-05T23:18:59.623Z", - "name": "Facility 2", - "type": "Large Facility", - "address": 1, - "swrs_facility_id": 1002, - "bcghg_id": "13219990006", - "latitude_of_largest_emissions": 43.5, - "longitude_of_largest_emissions": -123.5 - } - }, - { - "model": "registration.facility", - "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3aec", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:18:07.664Z", - "name": "Facility 3", - "type": "Medium Facility", - "swrs_facility_id": 1003, - "bcghg_id": "13219990007", - "latitude_of_largest_emissions": 43.5, - "longitude_of_largest_emissions": -123.5 - } - }, - { - "model": "registration.facility", - "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3aed", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:18:07.664Z", - "name": "Facility 4", - "type": "Small Aggregate", - "swrs_facility_id": 1004, - "bcghg_id": "13219990008", - "latitude_of_largest_emissions": 43.5, - "longitude_of_largest_emissions": -123.5 - } - }, - { - "model": "registration.facility", - "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3aee", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:18:07.664Z", - "name": "Facility 5", - "type": "Large Facility", - "swrs_facility_id": 1005, - "bcghg_id": "13219990009", - "latitude_of_largest_emissions": 43.5, - "longitude_of_largest_emissions": -123.5 - } - }, - { - "model": "registration.facility", - "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3aef", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:18:07.664Z", - "name": "Facility 6", - "type": "Large Facility", - "swrs_facility_id": 1006, - "bcghg_id": "13219990010", - "latitude_of_largest_emissions": 43.5, - "longitude_of_largest_emissions": -123.5 - } - }, - { - "model": "registration.facility", - "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3af0", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:18:07.664Z", - "name": "Facility 7", - "type": "Large Facility", - "swrs_facility_id": 1007, - "bcghg_id": "13219990011", - "latitude_of_largest_emissions": 43.5, - "longitude_of_largest_emissions": -123.5 - } - }, - { - "model": "registration.facility", - "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3af1", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:18:07.664Z", - "name": "Facility 8", - "type": "Large Facility", - "swrs_facility_id": 1008, - "bcghg_id": "13219990012", - "latitude_of_largest_emissions": 43.5, - "longitude_of_largest_emissions": -123.5 - } - }, - { - "model": "registration.facility", - "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3af2", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:18:07.664Z", - "name": "Facility 9", - "type": "Large Facility", - "swrs_facility_id": 1009, - "bcghg_id": "13219990013", - "latitude_of_largest_emissions": 43.5, - "longitude_of_largest_emissions": -123.5 - } - }, - { - "model": "registration.facility", - "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3af3", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:18:07.664Z", - "name": "Facility 10", - "type": "Large Facility", - "swrs_facility_id": 1010, - "bcghg_id": "13219990014", - "latitude_of_largest_emissions": 43.5, - "longitude_of_largest_emissions": -123.5 - } - }, - { - "model": "registration.facility", - "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3af4", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:18:07.664Z", - "name": "Facility 11", - "type": "Large Facility", - "swrs_facility_id": 1011, - "bcghg_id": "13219990015", - "latitude_of_largest_emissions": 43.5, - "longitude_of_largest_emissions": -123.5 - } - }, - { - "model": "registration.facility", - "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3af5", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:18:07.664Z", - "name": "Facility 12", - "type": "Large Facility", - "swrs_facility_id": 1012, - "bcghg_id": "13219990016", - "latitude_of_largest_emissions": 43.5, - "longitude_of_largest_emissions": -123.5 - } - }, - { - "model": "registration.facility", - "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3af6", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:18:07.664Z", - "name": "Facility 13", - "type": "Large Facility", - "swrs_facility_id": 1013, - "bcghg_id": "13219990017", - "latitude_of_largest_emissions": 43.5, - "longitude_of_largest_emissions": -123.5 - } - }, - { - "model": "registration.facility", - "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3af7", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:18:07.664Z", - "name": "Facility 14", - "type": "Large Facility", - "swrs_facility_id": 1014, - "bcghg_id": "13219990018", - "latitude_of_largest_emissions": 43.5, - "longitude_of_largest_emissions": -123.5 - } - }, - { - "model": "registration.facility", - "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3af8", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:18:07.664Z", - "name": "Facility 15", - "type": "Large Facility", - "swrs_facility_id": 1015, - "bcghg_id": "13219990019", - "latitude_of_largest_emissions": 43.5, - "longitude_of_largest_emissions": -123.5 - } - }, - { - "model": "registration.facility", - "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3af9", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:18:07.664Z", - "name": "Facility 16", - "type": "Large Facility", - "swrs_facility_id": 1016, - "bcghg_id": "13219990020", - "latitude_of_largest_emissions": 43.5, - "longitude_of_largest_emissions": -123.5 - } - }, - { - "model": "registration.facility", - "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3afa", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:18:07.664Z", - "name": "Facility 17", - "type": "Large Facility", - "swrs_facility_id": 1017, - "bcghg_id": "13219990021", - "latitude_of_largest_emissions": 43.5, - "longitude_of_largest_emissions": -123.5 - } - }, - { - "model": "registration.facility", - "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3afb", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:18:07.664Z", - "name": "Facility 18", - "type": "Large Facility", - "swrs_facility_id": 1018, - "bcghg_id": "13219990022", - "latitude_of_largest_emissions": 43.5, - "longitude_of_largest_emissions": -123.5 - } - }, - { - "model": "registration.facility", - "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3afc", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:18:07.664Z", - "name": "Facility 19", - "type": "Large Facility", - "swrs_facility_id": 1019, - "bcghg_id": "13219990023", - "latitude_of_largest_emissions": 43.5, - "longitude_of_largest_emissions": -123.5 - } - }, - { - "model": "registration.facility", - "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3afd", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:18:07.664Z", - "name": "Facility 20", - "type": "Large Facility", - "swrs_facility_id": 1020, - "bcghg_id": "13219990024", - "latitude_of_largest_emissions": 43.5, - "longitude_of_largest_emissions": -123.5 - } - }, - { - "model": "registration.facility", - "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3afe", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:18:07.664Z", - "name": "Facility 21", - "type": "Large Facility", - "swrs_facility_id": 1021, - "bcghg_id": "13219990025", - "latitude_of_largest_emissions": 43.5, - "longitude_of_largest_emissions": -123.5 - } - }, - { - "model": "registration.facility", - "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3aff", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:18:07.664Z", - "name": "Facility 22", - "type": "Single Facility", - "swrs_facility_id": 1022, - "bcghg_id": "13219990026", - "latitude_of_largest_emissions": 43.5, - "longitude_of_largest_emissions": -123.5 - } - }, - { - "model": "registration.facility", - "pk": "459b80f9-b5f3-48aa-9727-90c30eaf3a59", - "fields": { - "created_by": "00000000-0000-0000-0000-000000000001", - "created_at": "2024-06-05T23:18:59.623Z", - "name": "Facility 23", - "type": "Large Facility", - "address": 2, - "swrs_facility_id": 1023, - "bcghg_id": "13219990027", - "latitude_of_largest_emissions": 43.5, - "longitude_of_largest_emissions": -123.5 - } - }, - { - "model": "registration.facility", - "pk": "4486f2fb-62ed-438d-bb3e-0819b51e3aff", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:18:07.664Z", - "name": "Facility 24", - "type": "Single Facility", - "swrs_facility_id": 1024, - "bcghg_id": "13219990999", - "latitude_of_largest_emissions": 43.5, - "longitude_of_largest_emissions": -123.5 - } - } -] diff --git a/bc_obps/registration/fixtures/mock/v1/facility_designated_operation_timeline.json b/bc_obps/registration/fixtures/mock/v1/facility_designated_operation_timeline.json deleted file mode 100644 index 7af437d129..0000000000 --- a/bc_obps/registration/fixtures/mock/v1/facility_designated_operation_timeline.json +++ /dev/null @@ -1,236 +0,0 @@ -[ - { - "model": "registration.facilitydesignatedoperationtimeline", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:19:34.959Z", - "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3aeb", - "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", - "start_date": "2024-06-05T23:19:32Z", - "status": "Closed" - } - }, - { - "model": "registration.facilitydesignatedoperationtimeline", - "fields": { - "created_by": "00000000-0000-0000-0000-000000000001", - "created_at": "2024-06-05T23:19:57.459Z", - "facility": "459b80f9-b5f3-48aa-9727-90c30eaf3a58", - "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", - "start_date": "2024-06-05T23:19:56Z", - "end_date": "2024-06-28T23:20:02Z", - "status": "Transferred" - } - }, - { - "model": "registration.facilitydesignatedoperationtimeline", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:19:58.000Z", - "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3aec", - "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", - "start_date": "2024-06-05T23:19:57Z", - "status": "Temporarily Shutdown" - } - }, - { - "model": "registration.facilitydesignatedoperationtimeline", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:19:58.500Z", - "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3aed", - "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", - "start_date": "2024-06-05T23:19:58Z" - } - }, - { - "model": "registration.facilitydesignatedoperationtimeline", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:19:59.000Z", - "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3aee", - "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", - "start_date": "2024-06-05T23:19:59Z" - } - }, - { - "model": "registration.facilitydesignatedoperationtimeline", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:19:59.500Z", - "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3aef", - "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", - "start_date": "2024-06-05T23:19:59Z" - } - }, - { - "model": "registration.facilitydesignatedoperationtimeline", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:20:00.000Z", - "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3af0", - "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", - "start_date": "2024-06-05T23:20:00Z" - } - }, - { - "model": "registration.facilitydesignatedoperationtimeline", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:20:00.500Z", - "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3af1", - "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", - "start_date": "2024-06-05T23:20:00Z" - } - }, - { - "model": "registration.facilitydesignatedoperationtimeline", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:20:01.000Z", - "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3af2", - "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", - "start_date": "2024-06-05T23:20:01Z" - } - }, - { - "model": "registration.facilitydesignatedoperationtimeline", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:20:01.500Z", - "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3af3", - "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", - "start_date": "2024-06-05T23:20:01Z" - } - }, - { - "model": "registration.facilitydesignatedoperationtimeline", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:20:02.000Z", - "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3af4", - "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", - "start_date": "2024-06-05T23:20:02Z" - } - }, - { - "model": "registration.facilitydesignatedoperationtimeline", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:20:02.500Z", - "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3af5", - "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", - "start_date": "2024-06-05T23:20:02Z" - } - }, - { - "model": "registration.facilitydesignatedoperationtimeline", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:20:03.000Z", - "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3af6", - "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", - "start_date": "2024-06-05T23:20:03Z" - } - }, - { - "model": "registration.facilitydesignatedoperationtimeline", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:20:03.500Z", - "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3af7", - "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", - "start_date": "2024-06-05T23:20:03Z" - } - }, - { - "model": "registration.facilitydesignatedoperationtimeline", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:20:04.000Z", - "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3af8", - "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", - "start_date": "2024-06-05T23:20:04Z" - } - }, - { - "model": "registration.facilitydesignatedoperationtimeline", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:20:04.500Z", - "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3af9", - "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", - "start_date": "2024-06-05T23:20:04Z" - } - }, - { - "model": "registration.facilitydesignatedoperationtimeline", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:20:05.000Z", - "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3afa", - "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", - "start_date": "2024-06-05T23:20:05Z" - } - }, - { - "model": "registration.facilitydesignatedoperationtimeline", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:20:05.500Z", - "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3afb", - "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", - "start_date": "2024-06-05T23:20:05Z" - } - }, - { - "model": "registration.facilitydesignatedoperationtimeline", - "fields": { - "created_by": "00000000-0000-0000-0000-000000000001", - "created_at": "2024-06-05T23:20:06.000Z", - "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3afd", - "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", - "start_date": "2024-06-05T23:20:06Z" - } - }, - { - "model": "registration.facilitydesignatedoperationtimeline", - "fields": { - "created_by": "00000000-0000-0000-0000-000000000001", - "created_at": "2024-06-05T23:20:06.500Z", - "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3afe", - "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", - "start_date": "2024-06-05T23:20:06Z" - } - }, - { - "model": "registration.facilitydesignatedoperationtimeline", - "fields": { - "created_by": "00000000-0000-0000-0000-000000000001", - "created_at": "2024-06-05T23:20:07.000Z", - "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3aff", - "operation": "3b5b95ea-2a1a-450d-8e2e-2e15feed96c9", - "start_date": "2024-06-05T23:20:07Z" - } - }, - { - "model": "registration.facilitydesignatedoperationtimeline", - "fields": { - "created_by": "00000000-0000-0000-0000-000000000001", - "created_at": "2024-06-20T23:20:02Z", - "facility": "459b80f9-b5f3-48aa-9727-90c30eaf3a58", - "operation": "e1300fd7-2dee-47d1-b655-2ad3fd10f052", - "start_date": "2024-06-28T23:20:02Z" - } - }, - { - "model": "registration.facilitydesignatedoperationtimeline", - "fields": { - "created_by": "00000000-0000-0000-0000-000000000001", - "created_at": "2024-06-20T23:20:02Z", - "facility": "4486f2fb-62ed-438d-bb3e-0819b51e3aff", - "operation": "1bd04128-d070-4d3a-940a-0874c4956181", - "start_date": "2024-06-28T23:20:02Z" - } - } -] diff --git a/bc_obps/registration/fixtures/mock/v1/operation_designated_operator_timeline.json b/bc_obps/registration/fixtures/mock/v1/operation_designated_operator_timeline.json deleted file mode 100644 index 97631998fa..0000000000 --- a/bc_obps/registration/fixtures/mock/v1/operation_designated_operator_timeline.json +++ /dev/null @@ -1,156 +0,0 @@ -[ - { - "model": "registration.operationdesignatedoperatortimeline", - "fields": { - "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", - "created_at": "2024-12-06T21:08:53.565Z", - "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", - "operator": "685d581b-5698-411f-ae00-de1d97334a71", - "start_date": "2024-12-06T21:09:07Z", - "status": "Active" - } - }, - { - "model": "registration.operationdesignatedoperatortimeline", - "fields": { - "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", - "created_at": "2024-12-06T21:11:26.265Z", - "operation": "02a3ab84-26c6-4a79-bf89-72f877ceef8e", - "operator": "685d581b-5698-411f-ae00-de1d97334a71", - "start_date": "2024-12-06T21:11:51Z", - "status": "Active" - } - }, - { - "model": "registration.operationdesignatedoperatortimeline", - "fields": { - "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", - "created_at": "2024-12-06T21:11:45.702Z", - "operation": "0ac72fa9-2636-4f54-b378-af6b1a070787", - "operator": "685d581b-5698-411f-ae00-de1d97334a71", - "start_date": "2024-12-06T21:11:37Z", - "status": "Active" - } - }, - { - "model": "registration.operationdesignatedoperatortimeline", - "fields": { - "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", - "created_at": "2024-12-06T21:12:18.766Z", - "operation": "17550cd8-3e73-4e52-aa91-ab90cb3b62b0", - "operator": "685d581b-5698-411f-ae00-de1d97334a71", - "start_date": "2024-12-06T21:12:13Z", - "status": "Active" - } - }, - { - "model": "registration.operationdesignatedoperatortimeline", - "fields": { - "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", - "created_at": "2024-12-06T21:12:42.300Z", - "operation": "17f13f4d-29b4-45f4-b025-b21f2e126771", - "operator": "685d581b-5698-411f-ae00-de1d97334a71", - "start_date": "2024-12-06T21:12:40Z", - "status": "Active" - } - }, - { - "model": "registration.operationdesignatedoperatortimeline", - "fields": { - "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", - "created_at": "2024-12-06T21:13:06.052Z", - "operation": "1bd04128-d070-4d3a-940a-0874c4956181", - "operator": "685d581b-5698-411f-ae00-de1d97334a71", - "start_date": "2024-12-06T21:13:03Z", - "status": "Active" - } - }, - { - "model": "registration.operationdesignatedoperatortimeline", - "fields": { - "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", - "created_at": "2024-12-06T21:13:41.375Z", - "operation": "21e70498-c4b0-4525-8443-86faa96206e3", - "operator": "685d581b-5698-411f-ae00-de1d97334a71", - "start_date": "2024-12-06T21:15:00Z", - "status": "Active" - } - }, - { - "model": "registration.operationdesignatedoperatortimeline", - "fields": { - "created_by": "4da70f32-65fd-4137-87c1-111f2daba3dd", - "created_at": "2024-12-06T21:14:06.087Z", - "operation": "3b5b95ea-2a1a-450d-8e2e-2e15feed96c9", - "operator": "685d581b-5698-411f-ae00-de1d97334a71", - "start_date": "2024-12-06T21:14:04Z", - "status": "Active" - } - }, - { - "model": "registration.operationdesignatedoperatortimeline", - "fields": { - "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", - "created_at": "2024-12-06T21:14:23.612Z", - "operation": "436dd99a-cb41-4494-91c9-98ab149b557d", - "operator": "685d581b-5698-411f-ae00-de1d97334a71", - "start_date": "2024-12-06T21:14:48Z", - "status": "Active" - } - }, - { - "model": "registration.operationdesignatedoperatortimeline", - "fields": { - "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", - "created_at": "2024-12-06T21:14:41.273Z", - "operation": "59d95661-c752-489b-9fd1-0c3fa3454dda", - "operator": "685d581b-5698-411f-ae00-de1d97334a71", - "start_date": "2024-12-06T21:14:40Z", - "status": "Active" - } - }, - { - "model": "registration.operationdesignatedoperatortimeline", - "fields": { - "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", - "created_at": "2024-12-06T21:15:23.053Z", - "operation": "6d07d02a-1ad2-46ed-ad56-2f84313e98bf", - "operator": "685d581b-5698-411f-ae00-de1d97334a71", - "start_date": "2024-12-06T21:15:22Z", - "status": "Active" - } - }, - { - "model": "registration.operationdesignatedoperatortimeline", - "fields": { - "created_by": "00000000-0000-0000-0000-000000000023", - "created_at": "2024-12-06T21:21:42.102Z", - "operation": "7d3fc7d1-0504-4ee4-a9c5-447f4b324b57", - "operator": "4a792f0f-cf9d-48c8-9a95-f504c5f84b12", - "start_date": "2024-12-06T21:21:40Z", - "status": "Active" - } - }, - { - "model": "registration.operationdesignatedoperatortimeline", - "fields": { - "created_by": "00000000-0000-0000-0000-000000000023", - "created_at": "2024-12-06T21:22:04.647Z", - "operation": "8563da83-0762-4d29-9b22-da5b52ef0f24", - "operator": "4a792f0f-cf9d-48c8-9a95-f504c5f84b12", - "start_date": "2024-12-06T21:22:03Z", - "status": "Active" - } - }, - { - "model": "registration.operationdesignatedoperatortimeline", - "fields": { - "created_by": "00000000-0000-0000-0000-000000000023", - "created_at": "2024-12-06T21:22:24.993Z", - "operation": "954c0382-ff61-4e87-a8a0-873586534b54", - "operator": "4a792f0f-cf9d-48c8-9a95-f504c5f84b12", - "start_date": "2024-12-06T21:22:22Z", - "status": "Active" - } - } -] diff --git a/bc_obps/registration/fixtures/mock/v1/restart_event.json b/bc_obps/registration/fixtures/mock/v1/restart_event.json deleted file mode 100644 index 596bf6f6b0..0000000000 --- a/bc_obps/registration/fixtures/mock/v1/restart_event.json +++ /dev/null @@ -1,45 +0,0 @@ -[ - { - "model": "registration.restartevent", - "pk": "1a491d98-fde9-482d-9241-0497c15dc517", - "fields": { - "created_by": "ba2ba62a121842e0942aab9e92ce8822", - "created_at": "2024-06-05T23:25:37.892Z", - "operation": "3b5b95ea-2a1a-450d-8e2e-2e15feed96c9", - "effective_date": "2024-06-05T09:00:00Z" - } - }, - { - "model": "registration.restartevent", - "pk": "a5f04108-886c-4eac-980c-f350714b099f", - "fields": { - "created_by": "00000000-0000-0000-0000-000000000005", - "created_at": "2024-08-21T23:26:40.645Z", - "operation": "3b5b95ea-2a1a-450d-8e2e-2e15feed96c9", - "effective_date": "2025-03-05T09:00:00Z" - } - }, - { - "model": "registration.restartevent", - "pk": "1363536b-390b-4074-b691-575b678d0c70", - "fields": { - "created_by": "00000000-0000-0000-0000-000000000003", - "created_at": "2024-06-05T23:23:08.327Z", - "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", - "effective_date": "2026-01-10T09:00:00Z" - } - }, - { - "model": "registration.restartevent", - "pk": "375ab674-aba4-4381-a72d-95df0e03867e", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-08-20T18:23:08.327Z", - "effective_date": "2026-01-10T09:00:00Z", - "facilities": [ - "459b80f9-b5f3-48aa-9727-90c30eaf3a58", - "f486f2fb-62ed-438d-bb3e-0819b51e3aeb" - ] - } - } -] diff --git a/bc_obps/registration/fixtures/mock/v1/temporary_shutdown_event.json b/bc_obps/registration/fixtures/mock/v1/temporary_shutdown_event.json deleted file mode 100644 index 79fc334ad6..0000000000 --- a/bc_obps/registration/fixtures/mock/v1/temporary_shutdown_event.json +++ /dev/null @@ -1,35 +0,0 @@ -[ - { - "model": "registration.temporaryshutdownevent", - "fields": { - "created_by": "ba2ba62a121842e0942aab9e92ce8822", - "created_at": "2024-07-05T23:25:37.892Z", - "operation": "3b5b95ea-2a1a-450d-8e2e-2e15feed96c9", - "effective_date": "2024-08-21T09:00:00Z", - "description": "Shutting down for the day because we can't find our keys to unlock the building" - } - }, - { - "model": "registration.temporaryshutdownevent", - "fields": { - "created_by": "00000000-0000-0000-0000-000000000001", - "created_at": "2024-08-20T18:23:08.327Z", - "effective_date": "2026-01-10T09:00:00Z", - "facilities": [ - "459b80f9-b5f3-48aa-9727-90c30eaf3a58", - "f486f2fb-62ed-438d-bb3e-0819b51e3aeb" - ], - "description": "" - } - }, - { - "model": "registration.temporaryshutdownevent", - "fields": { - "created_by": "00000000-0000-0000-0000-000000000001", - "created_at": "2024-08-20T18:23:08.327Z", - "effective_date": "2026-01-10T09:00:00Z", - "operation": "3b5b95ea-2a1a-450d-8e2e-2e15feed96c9", - "description": "It's Pretzel Day!" - } - } -] diff --git a/bc_obps/registration/fixtures/mock/v1/transfer_event.json b/bc_obps/registration/fixtures/mock/v1/transfer_event.json deleted file mode 100644 index 1587fecdf1..0000000000 --- a/bc_obps/registration/fixtures/mock/v1/transfer_event.json +++ /dev/null @@ -1,47 +0,0 @@ -[ - { - "model": "registration.transferevent", - "fields": { - "created_by": "00000000-0000-0000-0000-000000000028", - "created_at": "2024-07-05T23:25:37.892Z", - "operation": "3b5b95ea-2a1a-450d-8e2e-2e15feed96c9", - "from_operator": "4242ea9d-b917-4129-93c2-db00b7451051", - "to_operator": "4a792f0f-cf9d-48c8-9a95-f504c5f84b12", - "effective_date": "2025-02-01T09:00:00Z", - "status": "To be transferred" - } - }, - { - "model": "registration.transferevent", - "fields": { - "created_by": "00000000-0000-0000-0000-000000000028", - "created_at": "2024-07-05T23:25:37.892Z", - "updated_by": "00000000-0000-0000-0000-000000000028", - "updated_at": "2024-08-20T17:00:54.543Z", - "operation": "d99725a7-1c3a-47cb-a59b-e2388ce0fa18", - "from_operator": "4242ea9d-b917-4129-93c2-db00b7451051", - "to_operator": "4a792f0f-cf9d-48c8-9a95-f504c5f84b12", - "effective_date": "2024-08-21T09:00:00Z", - "status": "Transferred" - } - }, - { - "model": "registration.transferevent", - "fields": { - "created_by": "00000000-0000-0000-0000-000000000028", - "created_at": "2024-07-05T23:25:37.892Z", - "updated_by": "00000000-0000-0000-0000-000000000028", - "updated_at": "2024-08-20T17:00:54.543Z", - "facilities": [ - "459b80f9-b5f3-48aa-9727-90c30eaf3a58", - "f486f2fb-62ed-438d-bb3e-0819b51e3aed" - ], - "from_operator": "4242ea9d-b917-4129-93c2-db00b7451051", - "to_operator": "685d581b-5698-411f-ae00-de1d97334a71", - "from_operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", - "to_operation": "e1300fd7-2dee-47d1-b655-2ad3fd10f052", - "status": "Complete", - "effective_date": "2024-12-25T09:00:00Z" - } - } -] diff --git a/docs/registration_part_2/data-models.md b/docs/registration_part_2/data-models.md index 24c56110ab..ff14dc63af 100644 --- a/docs/registration_part_2/data-models.md +++ b/docs/registration_part_2/data-models.md @@ -28,3 +28,11 @@ If you need to change something: - See if it's possible to make the change in a way to make the existing models work for both v1 and v2. For example, in v1 we have `operation_type` as a `CharField`, and in v2 it will be a foreign key field to an `OperationType` models. We can add the v1 types (they were selected via dropdown so only a few options) to to the `OperationType` model so that both v1 and v2 can use the foreign key table. - If it's not possible to use the same models, we'll have to look into field or model versioning. E.g. of field versioning: We have `data_field`. We create `data_field_1`. Once we are done with v2, we can remove `data_field` and rename `data_field_1` to `data_field`. + +## Mock data + +v1 and v2 have separate fixtures. This is so that we can keep the v1 e2e tests running while allowing v2 testers to see more accurate data. For example, the only allowed operation.status in v2 are NOT STARTED, DRAFT, and REGISTERED. v1 had additional statuses that are still supported but can't be assigned, and it's confusing for testers to see these old statues. + +v1 fixtures are stored in `bc_obps/registration/fixtures/mock/v1`. They can be loaded with the v1-specific make command `loadfixtures_v1`, and the v1 e2e tests run this command. + +v2 fixtures are in `bc_obps/registration/fixtures/mock/`. The model tests, v2 e2e tests, and make `loadfixtures` point to this directory.