drizzle-migration
Rules
- Set up Drizzle scripts up front and use them as the only migration entrypoints:
bun run db:generate,bun run db:migrate:local, andbun run db:migrate:remote. - Migration generation and schema syncing must always be Drizzle-driven: update schema files, generate with Drizzle, and apply with Drizzle; never hand-roll SQL migration files and never run out-of-band schema changes.
- Follow a safe rollout flow: apply
bun run db:migrate:localfirst, validate locally, commit schema + generated migrations together, then applybun run db:migrate:remotefor Cloudflare-connected environments.