Doctrine Migration Guard tool flags risky database migrations before they reach production
A developer has released Doctrine Migration Guard, a standalone CLI tool that statically analyzes Doctrine database migrations targeting MySQL and MariaDB. The tool parses migration source files and classifies SQL operations found inside up() methods into risk levels ranging from INFO to CRITICAL, without connecting to a database or executing any code. Risky operations such as DROP COLUMN, DELETE without a WHERE clause, or adding a NOT NULL column are flagged for human review before deployment. The tool also marks migrations it cannot reliably analyze as INCOMPLETE rather than guessing, avoiding false confidence from incomplete static analysis. It can be installed as a Composer development dependency and run against individual files or entire migration directories as part of a CI pipeline.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in