Writing · Tag
Articles tagged "data-integrity".
4 articles on this topic.
Articles tagged "data-integrity"
·7 min read · postgres , supabase , postgres-triggers
How to build a tamper-evident audit log in Postgres with one trigger
Step-by-step: build an audit log table, attach a SECURITY DEFINER trigger that captures every UPDATE and DELETE, lock it down with RLS.
·7 min read · supabase , postgrest , postgres
How a Postgres constraint rename silently broke production via PostgREST
PostgREST's `.upsert({ onConflict: 'name' })` resolves against your real constraint name. Rename the constraint and the upsert silently fails.
·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.
·9 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.