Neon and Drizzle
Pooled runtime queries, direct migrations, and committed SQL.
Monorepos use Neon Postgres through Drizzle ORM. Two URLs have intentionally different jobs:
DATABASE_URL=postgresql://...-pooler.../app
DIRECT_DATABASE_URL=postgresql://.../appDATABASE_URLis pooled and serves normal API traffic.DIRECT_DATABASE_URLis unpooled and runs schema migrations.
Apply committed migrations with pnpm db:migrate. Schema code lives in apps/api/src/db/schema.ts; SQL migrations live in apps/api/drizzle.