database · git:20260805.c3b5ab5 · 2026-08-05 · sha256 0852216e8920cbce

database git:20260805.c3b5ab5A

Immutable. This exact content never changes and is served at /api/v1/blob/0852216e8920cbce.

No tool to install first
claude plugin marketplace add https://markdownregistry.com/mp/a/art_2csflbj57x3zpib3/0852216e8920cbced4d5db096ba14c738142f21e93f16443dca16a0cd6d3b2da.json

Then /plugin install database@markdownregistry-2csflbj57x3zpib3 in Claude Code. It installs this exact version, the one graded A here, pinned to the commit it was graded at, and leaves it there.

---
name: database
description: Drizzle-first database architecture and migration workflow for this monorepo. Use when touching database schemas, migrations, or database package structure.
---

# Database & migrations

- Default to Drizzle when working with databases.
- When runtime database access is Effect-based and targets PostgreSQL, use `@effect/sql-pg` as the Postgres adapter, and prefer the shared `@<repo>/db` helpers over app-local PgClient wiring.
- Do not handwrite SQL migration files; generate them with Drizzle Kit from the schema source of truth.
- Unless a database is intentionally app-private, keep its schema, migrations, config, and scripts in a dedicated package — `packages/db` for the primary database, one package per database if there are several.
- The canonical justfile owns the local dev database container (`just dev-db-start`); never add a repo-local script for it.
- Script migrations as `"db:migrate": "bun --env-file=.env.local drizzle-kit migrate"`; plain `bun run` does not load `.env.local`.