# drizzle migrations This directory holds SQL migrations generated by `drizzle-kit generate` from the TypeScript schema in `src/lib/server/db/schema/`. Commands: - `npm run db:generate` — diff the schema vs. the latest snapshot and emit a new `.sql` file - `npm run db:migrate` — apply pending migrations to `DATABASE_URL` - `npm run db:push` — skip migrations and sync the schema directly (**dev only**) - `npm run db:studio` — open the Drizzle Studio UI After every generate, review the SQL for surprises — especially around: - enum additions (non-blocking) vs. removals (require a separate data migration) - index changes on large tables (use `CONCURRENTLY` in production rollouts) - anything touching `assets.custom_fields` — see `project_buildfor_life_ops.md` memory for the immutable-key policy.