Closed franTarkenton closed 3 months ago
PR: https://github.com/bcgov/nr-rfc-alertauthoring/pull/115
Tests are in place and also created a portforward and verified that the deployment is working correctly, ie the history is being recorded on the deployed version.
sample script to see all the historical data in the db:
select
*
from
py_api.alert_history alert_hist,
py_api.alert_area_history area_hist,
py_api.basins basins,
py_api.alert_levels alert_lvls
where
alert_hist.alert_history_id = area_hist.alert_history_id and
area_hist.basin_id = basins.basin_id and
area_hist.alert_level_id = alert_lvls.alert_level_id
A database method exists to record history of an alert when it changes, however it is not being called when an alert is modified through the api.
Acceptance Criteria