We will delete all device reports (and associated validation_state records,
and then orphaned validation_results) that are older than 6 months, except we
retain the most recent report of each state (error, fail, pass).
Due to the amount of time to run (6+ hours), it is implemented mainly as a
command that can be run in parallel with normal operations, rather than as a
database migration that is run in between system restarts.
We will delete all device reports (and associated validation_state records, and then orphaned validation_results) that are older than 6 months, except we retain the most recent report of each state (error, fail, pass).
Due to the amount of time to run (6+ hours), it is implemented mainly as a command that can be run in parallel with normal operations, rather than as a database migration that is run in between system restarts.