Skip to main content
All skills

PostgreSQL & Data Modelling

Relational schema design with Drizzle — migrations, types and query boundaries derived from one definition.

How I use it

  1. Schema as the single source of truth

    Drizzle schemas driving both migrations and application types, so the database and the code cannot hold different beliefs about what a record contains.

  2. Multi-tenant isolation

    Tenant scoping enforced in the query layer rather than at each call site, so a forgotten filter cannot quietly leak rows across a boundary.

  3. Modelling state that changes over time

    Subscriptions, orders and catalogue records all have lifecycles. Modelling the transitions explicitly is what stops the awkward states — a refunded order, a lapsed plan mid-cycle — from becoming a nullable column nobody can reason about.

What I use

  • PostgreSQL
  • Drizzle ORM
  • SQLite
  • pgvector

Related skills

Want the detail behind any of this?

I can walk through any of it in as much depth as you want.

Get in touch