If you let Claude Code, Codex or Cursor write a migration, you've probably seen a PR that's all green: tests pass, CI is happy. Tests usually run against a fresh database, so they rarely notice a change that deletes data. A dropped column, a DELETE with no WHERE , or rm -rf $OUT_DIR/ can sit in a diff that looks routine.
Here are the patterns I watch for, and the cheap checks I use for each one. You can do all of this with git, a grep, and (if you're on Rails) a free gem.
1. The migration drops or renames something
Here are the kind of lines that look routine in a migration:
remove_column :users , :email
Enter fullscreen mode
Exit fullscreen mode
DROP TABLE sessions ; ALTER TABLE orders DROP COLUMN total ;
Enter fullscreen mode
Exit fullscreen mode
Django, Alembic, Knex, Laravel, Sequelize and Prisma can all do the same thing in their own dialects.…