Skip to main content

Branch sequence

Always apply in this order: dev → demo → prod.

Run

Verify

Rollback

Migrations are forward-only. To roll back, write a new migration that undoes the change. Never edit a previously-applied migration file — it breaks the migration journal.

Common pitfalls

  • Running migrations against an uncommitted prod branch — always confirm git status is clean.
  • Forgetting to apply to demo — demo seeds rely on the latest schema.
  • Adding a NOT NULL column to a hot table without a backfill — use NULL → backfill → NOT NULL pattern instead.