Drizzle ORM (database access)
Drizzle is the ORM layer we use to talk to relational databases with:
- a typed schema (tables/columns)
- typed queries
- migrations (via Drizzle Kit)
Where it fits in our stack
- UI (client) never talks to the database directly.
- Database access happens on the server:
- inside tRPC procedures, or
- inside server-only modules called by procedures / Server Components.
Sources
- Drizzle ORM docs: https://orm.drizzle.team/
- Drizzle Kit (migrations): https://orm.drizzle.team/kit-docs/overview
What to learn first
- defining tables + types
- selecting/inserting/updating
- migrations workflow (how schema changes are applied)
Exercises (planned)
- Add a
teamstable and implement CRUD behind tRPC procedures. - Add a migration and verify the schema change locally.
Last updated on