Spaces:
Running on Zero
Running on Zero
Download scripts/retention_cleanup.sql from aseemlais/ats-engine: direct link, hf CLI and curl.
- Browser
- Download file 626 Bytes
-
https://huggingface.co/spaces/aseemlais/ats-engine/resolve/main/scripts/retention_cleanup.sql
- Command line
-
hf download hf://spaces/aseemlais/ats-engine/scripts/retention_cleanup.sql
-
curl -L -o retention_cleanup.sql https://huggingface.co/spaces/aseemlais/ats-engine/resolve/main/scripts/retention_cleanup.sql
626 Bytes
| -- retention_cleanup.sql | |
| -- Description: Data retention policy for completed/failed jobs (default 30 days) to prevent PII accumulation | |
| -- Schema: ai_chatbot | |
| -- Option 1: Manual Runbook Execution (run periodically in Supabase SQL editor): | |
| DELETE FROM ai_chatbot."ExtractionJobs" | |
| WHERE "createdAt" < NOW() - INTERVAL '30 days'; | |
| -- Option 2: pg_cron (if pg_cron extension is enabled in your Supabase project): | |
| -- SELECT cron.schedule( | |
| -- 'cleanup-extraction-jobs-nightly', | |
| -- '0 3 * * *', -- Nightly at 3:00 AM UTC | |
| -- $$DELETE FROM ai_chatbot."ExtractionJobs" WHERE "createdAt" < NOW() - INTERVAL '30 days'$$ | |
| -- ); | |