ls ~/writing --tag=postgres

[01]Writing · Tag

Articles tagged "postgres".

$ tag --stat postgres
Articles
6
Published
Mar→Jul 2026
Reading time
75 min
In series
1

Articles tagged postgres

6 articles

40 min [lovable][supabase][vercel]

How I migrated a live app off Lovable onto my own Supabase and Vercel: the full runbook

Step-by-step runbook to move a live app from Lovable to your own Supabase and Vercel, with rollback gates, real incidents, and fixes.

Supabase Production Hardening 8/8

lovable-to-vercel-supabase-migration--cover
A routine Supabase branch merge deleted the entire dev environment, permanently.

7 min [supabase][supabase-vault][postgres]

How to encrypt API keys and client secrets in Supabase

Store client secrets in Supabase Vault, keep searchable metadata in Postgres, and gate every decrypt behind one checked SECURITY DEFINER function. Step-by-step SQL with the gotchas.

Supabase Production Hardening 7/8

supabase-vault-encrypt-client-secrets--cover
A leaked backup or one overbroad rule, and your clients’ passwords are plain text.

7 min [supabase][supabase-realtime][security]

Realtime broadcast scope is a security boundary, not a routing convenience

Default-public Realtime broadcasts leak message bodies to every subscriber. The private-channel flag plus RLS is the fix.

Supabase Production Hardening 6/8

supabase-realtime-broadcast-security-boundary--cover
Anyone who opens DevTools can subscribe to your Supabase channel and read every message.

8 min [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.

Supabase Production Hardening 3/8

audit-log-postgres-trigger-tutorial--cover
I never made that change.

6 min [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.

Supabase Production Hardening 2/8

postgrest-upsert-constraint-rename-fragility--cover
The migration ran clean on Tuesday. On Thursday nobody could invite anyone.

7 min [supabase][supabase-auth][postgres]

Two-layer identity models in Supabase: when auth and authorization disagree

Supabase Auth creates identities, not roles. Use a user_roles table, RLS policies, and one trigger migration so signups never strand users without permissions.

Supabase Production Hardening 1/8

two-layer-identity-models-supabase--cover
The user did something weird.

[02]Narrow it down

[03]Read in order

One series runs through this tag.