added db guard changes to prevent deletion
Some checks failed
Deploy / deploy (push) Successful in 57s
Security Tests / security-non-db (push) Successful in 18s
Security Tests / security-db (push) Failing after 20s

This commit is contained in:
2026-03-10 21:19:24 -05:00
parent 479a5ff9d7
commit fe96bf85da
9 changed files with 119 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
# Production DB Recovery and Safety Runbook
Last updated: March 2, 2026
Last updated: March 10, 2026
## Purpose
@@ -191,6 +191,8 @@ psql "postgres://<admin-user>:<admin-pass>@127.0.0.1:5432/skymoney" \
4. Deploy workflow runs `scripts/guard-prod-volume.sh` and blocks deploy when prod volume is missing/empty.
5. Deploy workflow runs pre-migration `scripts/backup.sh`.
6. Deploy workflow uses `prisma migrate deploy` only.
7. Security DB workflow runs `scripts/validate-test-db-target.sh` and refuses protected DB names (`skymoney`, `postgres`, `template*`).
8. DB-backed test runtime (`api/tests/setup.ts`) refuses protected DB targets before any `deleteMany` cleanup runs.
### Intentional rebuild override