Skip to content

Migration Strategies

Pack: drizzle-orm Parent skill: Drizzle ORM Migrations and Drizzle Kit Source: drizzle-orm/drizzle-orm-migrations-and-drizzle-kit/references/migration-strategies.md

  • deciding between push, generated SQL migrations, introspection, or export
  • setting up drizzle.config.ts
  • handling team migration conflicts
  • generate + migrate: best when you want SQL files, reviewability, and durable team history.
  • push: best for fast local iteration or environments where you intentionally skip migration files.
  • pull: best when an existing database is the source of truth and you want Drizzle schema from introspection.
  • export: best when Drizzle defines schema but another tool executes or manages migrations.
  • Use check to detect migration-history consistency problems across branches.
  • Keep separate config files for separate DBs or stages.
  • Keep schema exports complete so Drizzle Kit sees the whole intended model.
  • drizzle-kit up upgrades older snapshot formats.
  • The v1 upgrade guide explicitly calls out the new migration-folder structure and validator import moves.
  • The upgrade docs also note that MySQL schemas/databases are no longer handled by Drizzle Kit in the migration flow.
  • https://orm.drizzle.team/docs/migrations
  • https://orm.drizzle.team/docs/kit-overview
  • https://orm.drizzle.team/docs/drizzle-config-file
  • https://orm.drizzle.team/docs/kit-migrations-for-teams
  • https://orm.drizzle.team/docs/kit-web-mobile
  • https://orm.drizzle.team/docs/upgrade-v1