Writing · Tag
Articles tagged "data-integrity".
4 articles on this topic.
Articles tagged "data-integrity"
·8 min read · postgres , supabase , postgres-triggers
How to build a tamper-evident audit log in Postgres with one trigger
Build an audit log table, attach a SECURITY DEFINER trigger that captures every UPDATE and DELETE, lock it down with RLS. Forty lines of SQL.
·6 min read · supabase , postgrest , postgres
How a Postgres constraint rename silently broke production via PostgREST
PostgREST resolves onConflict against real constraint names at runtime. Rename a constraint and the upsert silently fails with a 400 nobody notices.
·7 min read · javascript , typescript , timezone-handling
Silent timezone bugs in JavaScript date arithmetic
`new Date().toISOString().split('T')[0]` returns the UTC date, not the user's local date. The bug, the fix, and why it only shows up in production.
·8 min read · bubble , bubble-list-field , data-integrity
Why I stopped trusting Bubble.io's list fields and re-query the database instead
Bubble.io list fields don't auto-update when children point at parents. Re-query the database, write the actual list back. Here is the pattern.