Database migration workflow with Claude Code
Dev.to AI
•
Generative AI
Database migrations are one of the riskier things to hand off to Claude Code. They modify data, they're hard to reverse, and a mistake in production is a real problem. Here's the workflow I've settled on. The core rule In CLAUDE.md: "Never run database migrations automatically. Generate the migration file, then stop and wait for review. Do not run migrate or db:migrate or equivalent commands without explicit instruction." This is the one place I always stay in review mode, regardless of what else I've delegated.