All modules
MODULE 03 · WHERE THE DATA LIVES
Database
Postgres. Always. Managed, to start.
Your data outlives every redesign, so it gets the most discipline. Schema changes happen only through migration files — never by clicking around a dashboard — so your agent, your history, and your production database always agree.
WHEN YOU NEED IT
Tier 1 and up. Tier 0 has no database at all.
THE CHOICE, PER TIER
- T1Supabase Postgres, plain SQL migrations
- T2Supabase Pro / Cloud SQL / Neon + Prisma migrate + Kysely
- T3+ connection pooling and a tested restore
SAY THIS TO YOUR AGENT
"Design the schema for my entities as SQL migration files. Every table gets created_at and updated_at. Turn on row-level security before anything ships."
DONE WHEN
- Schema exists only as migrations in the repo
- Row-level security or ownership checks are on
- You have restored a backup at least once