Drizzle ORM Migrations and Drizzle Kit
Pack:
drizzle-ormSource:drizzle-orm/drizzle-orm-migrations-and-drizzle-kit/SKILL.mdUse this skill when the task is about schema rollout, migration generation, introspection, or Drizzle Kit configuration.
- migration strategy choice
drizzle.config.tsand CLI options- SQL generation and application workflows
- introspection from existing databases
- migration consistency checks and snapshot upgrades
- Drizzle Studio launcher behavior
Routing cues
Section titled “Routing cues”drizzle-kit,drizzle.config.ts, migration folder layout, introspection, Studio, or migration conflicts -> use this skill- initial package install or upgrade routing -> use
drizzle-orm-overview-and-setup - schema declaration -> use
drizzle-orm-schema-and-relations - runtime-specific DB clients -> use
drizzle-orm-drivers-and-runtimes - query code, transactions, cache, or read replicas -> use
drizzle-orm-queries-and-sql
Default path
Section titled “Default path”- Read references/migration-strategies.md first.
- If the task is command-specific, read references/drizzle-kit-command-reference.md.
- Choose the workflow intentionally: code-first
generate/migrate, fast iterationpush, db-firstpull, or external-toolexport. - Keep
schema,out, credentials, and filters in sync between the real project structure anddrizzle.config.ts.
When to deviate
Section titled “When to deviate”- Use
pushonly when fast iteration or no-migration-file environments justify it. - Use
pullonly when the database is the real source of truth. - Use
exportwhen another system owns SQL execution but Drizzle still owns schema intent. - Move to overview or schema skills when the problem is package/setup or model design rather than rollout mechanics.
Quick example
Section titled “Quick example”npx drizzle-kit generatenpx drizzle-kit migrateGuardrails
Section titled “Guardrails”- Prefer generated SQL migrations for auditable team workflows. Use
pushdeliberately for fast iteration or non-migration-file environments. - Use
checkwhen multiple developers or branches can create divergent migration histories. - Use
pullwhen the database is the source of truth and you need Drizzle schema from an existing DB. - Use
exportwhen an external system owns SQL execution but Drizzle schema remains the source model. - Keep multiple config files explicit for separate stages or databases instead of overloading one config.
- Treat
schemaFilter,tablesFilter, andextensionsFiltersas correctness controls, not cleanup afterthoughts. drizzle-kit upis part of the v1 upgrade path because the snapshot and migration-folder format changed.- The docs describe local Drizzle Studio as free for local development, not as an OSS/self-hosted production surface.
- mixing
generate/migrate,push, and external migration ownership without intent - using one overloaded config for unrelated environments
- ignoring filters until after the wrong schema has been introspected or migrated
- treating local Studio as a production hosting surface
Verification checklist
Section titled “Verification checklist”- the migration workflow is chosen intentionally
- config paths, credentials, and filters match the real project layout
- team-conflict or divergence checks are considered when relevant
- upgrade-path commands like
upare used only in the proper context - Studio usage is scoped correctly
Canonical commands
Section titled “Canonical commands”drizzle-kit generatedrizzle-kit migratedrizzle-kit pushdrizzle-kit pulldrizzle-kit exportdrizzle-kit checkdrizzle-kit updrizzle-kit studio
Maintenance
Section titled “Maintenance”- Snapshot date: 2026-03-10
- Package snapshot:
drizzle-kit@0.31.9latest, beta tag1.0.0-beta.16-ea816b6