bcgov / cas-reporting

This is for the Clean Growth Digital Services team for work related to reporting.
Apache License 2.0
0 stars 0 forks source link

Saving raw report_activity data to an additional table #363

Closed pbastia closed 2 weeks ago

pbastia commented 1 month ago

Description:

For audit, diffing and after-the-fact data-integrity checks. When activity data is saved, it is sent to the backend as one large json object & is disaggregated into the report_activity, report_sourcetype, report*... tables.

We should save a copy of the raw (large json object) data on save as well. This will enable some extra auditing, diffing and integrity checking later on. The save api/service has already been done, this card just needs to update it to also save the raw json at the same time.

Acceptance Criteria:

Given I am on an activity page When I save the disaggregated data Then the raw json object data is saved as well

Model definition: report_raw_activity_data (Timestamped model) id pkey facility_report fkey -> facility_report activity fkey -> activity raw_data json

Development Checklist:

Definition of Ready (Note: If any of these points are not applicable, mark N/A)

Definition of Done (Note: If any of these points are not applicable, mark N/A)

Notes:

-

rdromey commented 1 month ago

@dleard to write dev checklist and ac