Doctrine Migrations
doctrine-project.org
What it is
Doctrine Migrations is a free, self-hosted PHP library for versioning database schemas and deploying changes in a reviewable, testable way. Built on Doctrine DBAL and ORM, it can generate migration code by comparing a database schema with ORM mapping information, with documentation covering diffing with or without the ORM. Console commands show migration status, perform dry runs, execute one or more migrations, and revert changes. Generated SQL can be written to a file with --write-sql instead of applied directly, while --no-interaction supports unattended execution. Transaction controls cover all-or-nothing behavior and running with or without transactions. Install it through Composer, which provides a doctrine-migrations console application, or download a PHAR from GitHub releases. Doctrine lists integrations for Symfony, Zend, Laravel, Silex, and Nette. Version 3.9.8 is stable; 3.8 and earlier are unmaintained.
Spec sheet
- Purpose
- Doctrine Migrations adds database schema versioning and helps deploy schema changes.Read 8 Oct 2026 · doctrine-project.org
- Intended users
- The Doctrine Project describes its libraries as PHP libraries focused primarily on persistence services and related functionality.Read 7 Oct 2026 · doctrine-project.org
- Support
- The documentation directs users to the Doctrine mailing list, Slack, GitHub bug reporting, and Stack Overflow for help.Read 8 Oct 2026 · doctrine-project.org
- License
- The GitHub repository identifies the project as MIT licensed.Read 8 Oct 2026 · github.com
- Automation
- The `--no-interaction` option allows migrations to run without additional prompts.Read 7 Oct 2026 · doctrine-project.org
- Command line
- A Composer installation provides a doctrine-migrations console application in vendor/bin.Read 8 Oct 2026 · doctrine-project.org
- Current stable version
- The project page lists version 3.9.8 as stable.Read 7 Oct 2026 · doctrine-project.org
- Database abstraction
- The project is built on top of Doctrine DBAL and ORM functionality.Read 8 Oct 2026 · doctrine-project.org
- Database integration
- The project builds on Doctrine DBAL and ORM.Read 7 Oct 2026 · doctrine-project.org
- Documentation support
- The documentation directs users to the Doctrine mailing list, Slack migrations channel, GitHub bug reports, and Stack Overflow for help.Read 7 Oct 2026 · doctrine-project.org
- Execution controls
- The documentation covers dry runs, executing one or multiple migrations, reverting migrations, and non-interactive execution.Read 8 Oct 2026 · doctrine-project.org
- Framework integrations
- The integrations guide lists community-built integrations for Symfony, Zend, Laravel, Silex, and Nette.Read 8 Oct 2026 · doctrine-project.org
- Install options
- It can be installed with Composer or downloaded as a PHAR from GitHub releases.Read 7 Oct 2026 · doctrine-project.org
- Installation
- The library can be installed with Composer or downloaded as a PHAR from GitHub releases.Read 8 Oct 2026 · doctrine-project.org
- Migration controls
- Users can inspect migration status, run dry runs, execute migrations, and revert them from the console.Read 7 Oct 2026 · doctrine-project.org
- Release status
- The project page marks version 3.9.8 as stable and versions 3.8 and earlier as unmaintained.Read 8 Oct 2026 · doctrine-project.org
- Review and testing
- The project says schema changes can be reviewed and tested before production deployment.Read 8 Oct 2026 · doctrine-project.org
- Risk note
- The migration command warns that schema changes can result in data loss and prompts for confirmation by default.Read 7 Oct 2026 · doctrine-project.org
- Schema comparison
- It can generate migrations by comparing the current database schema with mapping information defined through the ORM.Read 7 Oct 2026 · doctrine-project.org
- Schema diffing
- The documentation includes migration generation by diffing with the ORM or without the ORM.Read 8 Oct 2026 · doctrine-project.org
- Security reporting
- Doctrine asks security researchers to report issues privately by email rather than through GitHub's public issue tracker.Read 7 Oct 2026 · doctrine-project.org
- SQL output
- The `--write-sql` option can write generated migration SQL to a file instead of executing it directly against a database.Read 7 Oct 2026 · doctrine-project.org
- Symfony bundle
- Doctrine lists Doctrine Migrations Bundle as a Symfony integration with its own Composer package.Read 8 Oct 2026 · doctrine-project.org
- Symfony integration
- The Doctrine project lists Doctrine Migrations Bundle, described as Symfony DoctrineMigrationsBundle, as an integration.Read 7 Oct 2026 · doctrine-project.org
- Transactions
- The documentation covers all-or-nothing transactions and using or not using transactions.Read 8 Oct 2026 · doctrine-project.org
Plans and prices
Strong points and limits
Strong points
- Free MIT-licensed PHP library
- Generates migrations from schema differences
- Supports dry runs and rollback
- Can write SQL without executing
- Offers transaction controls
Limits
- Schema changes may cause data loss
- Versions 3.8 and earlier are unmaintained
- No free trial is listed
Who it suits
It suits PHP developers and teams managing database schema changes through Doctrine’s persistence libraries. It is intended for self-hosted projects that need migration review, testing, rollback, and automation.
Verdict
Doctrine Migrations provides command-line controls for inspecting, testing, applying, and reverting schema changes. Its Doctrine foundation and framework integrations make it suitable for PHP persistence workflows, with confirmation warnings addressing possible data loss.
Where Specifiction places it
- Database Migration Tools#6 of 328.5