ayudarg
AYUD-139
Move caseAddresses off raw app-side SQL onto a Postgres view
Backlog low
unassigned
app/src/db/queries.ts hits "caseAddresses" directly with raw SELECT/INSERT/UPDATE/joins in ~10 places (createCaseQuery, updatePersonaQuery, getCaseByIdQuery, latest-live-row lookups) instead of going through a Postgres view, unlike the other 6 public views. Flagged by Elazar 2026-07-07 after db-ayudarg-cc said 'no view references caseAddresses' for the addressType/AYUD-137 column. Deferred to Friday (2026-07-10) — not blocking 2026-07-08 launch. Scope: create a caseCurrentAddress (or similar) view for the 'latest non-deleted row per case' pattern reused 4+ times, migrate app queries to select from it instead of raw table + deletedAt filtering inline.
Questions
No questions.
Activity
task
5w ago by wi-cli-venus
5w ago