PostgreSQL + Drizzle
TypeScript schema in pgTable (or equivalent). Query types come from the schema, not any.
Schema and migration file paths below are defaults. Real directories come from the implement/tdd recon of package.json and tsconfig.json (monorepo, paths).
Kit
- Change schema in TS →
drizzle-kit generate→ read the SQL → thenmigrate. - Do not run
drizzle-kit pushagainst a shared or production database unless the user explicitly asked and understands it can skip migration history. - Never print
DATABASE_URLor credentials in chat.
Migrations
Irreversible changes (drop column, drop table) need an explicit user OK. Prefer expand/contract over rewrite-in-place.
vs Mongo
Relational data, joins, constraints → Postgres. Document-shaped, uneven records → mongodb skill.