Migration Workflow in Drizzle ORM
From the Drizzle ORM cheat sheet · Migrations · verified Jul 2026
Migration Workflow
Typical development workflow with schema changes and migrations.
bash
# 1. Edit your schema file (e.g., src/db/schema.ts)
# Add/modify tables, columns, indexes
# 2. Generate a migration
npx drizzle-kit generate
# Creates: drizzle/0001_add_user_table.sql
# 3. Review the generated SQL
cat drizzle/0001_add_user_table.sql
# 4. Apply the migration
npx drizzle-kit migrate
# 5. Check current schema status
npx drizzle-kit check
# 6. Drop a migration (if needed before applying)
npx drizzle-kit drop💡 Always review generated SQL before migrating
⚡ check validates migration consistency
📌 drop removes last migration file if unapplied
🟢 Commit migration files to version control
migrationsworkflowdrizzle-kit