Pocro Vento Documentation

Backend: Data retention (Assessments and BTC)

Last modified with commit 7a580a0 on by Aljaž.

Backend task for the 2-year data retention rule – a daily timer function that deletes or anonymises Assessments, BTC školovanja and BTC certificiranja whose end date is more than 2 years ago (soft-deleted records included), with their child rows and signature files. Check the end date per record type, decide delete vs anonymise, implement, and verify.

Docs: Assessments – Data retention, BTC – Data retention Spec: none. This is a background job with no API endpoint. DB: all Assessments and BTC tables in api/database/create_schema.sql

Data of Assessments, BTC školovanje and BTC certificiranje is kept for 2 years after the record’s end date. Deleting a record in the app is only a soft delete (DeletedAt), so this job is what finally removes the data.

1. Double check API spec and DB structure

2. Implementation

3. Verify implementation

Done when

Every night, Assessments and BTC data older than 2 years after its end date is deleted or anonymised, as decided, without manual work.