Skip to content
SPECIFICTION
Get listed

Doctrine Migrations vs sqlx-cli

Doctrine Migrations

doctrine-project.org

sqlx-cli

github.com

Side by side

FigureDoctrine Migrationssqlx-cli
Price fromFreeFree
Free planYesYes
Free trial——
Open source——
Windows—Yes
macOS—Yes
LinuxYesYes
Self-hostedYes—
Plans published11
Spec score · Database Migration Tools8.5 (#6)8.0 (#11)
InstallationThe library can be installed with Composer or downloaded as a PHAR from GitHub releases.The CLI can be installed with `cargo install sqlx-cli`.
LicenseThe GitHub repository identifies the project as MIT licensed.The SQLx repository lists Apache-2.0 and MIT license files.
PurposeDoctrine Migrations adds database schema versioning and helps deploy schema changes.SQLx CLI is a command-line utility for managing databases and migrations and enabling offline mode for SQLx query macros.
SupportThe documentation directs users to the Doctrine mailing list, Slack, GitHub bug reporting, and Stack Overflow for help.The SQLx repository links to its FAQ and Discord community for questions.

Plans

Doctrine Migrations

  • Doctrine MigrationsFree

Doctrine Migrations pricing →

sqlx-cli

  • sqlx-cliFree

sqlx-cli pricing →

In their own words

Doctrine Migrations

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.

Visit doctrine-project.org

sqlx-cli

sqlx-cli is SQLx’s command-line utility for managing databases, migrations, and offline preparation for query macros. It can create or drop the database identified by a database URL, and create, run, inspect, or revert migrations, including paired up and down scripts. The `cargo sqlx prepare` command writes query metadata to a `.sqlx` directory. Once that metadata is checked into version control, builds can run without an active database connection. The `--check` option returns a nonzero status if the saved metadata is out of date, a behavior the project describes for continuous integration.

For workspaces whose crates use query macros, `cargo sqlx prepare --workspace` places one `.sqlx` directory at the workspace root. Commands accept the database URL through `--database-url`, the `DATABASE_URL` environment variable, or a `.env` file in the current directory. The project lists PostgreSQL, MySQL, MariaDB, and SQLite support, with installation options for database drivers and TLS backends. The CLI is free and open source under the user’s choice of Apache-2.0 or MIT license. The README notes that MSSQL support was removed pending a full driver rewrite.

Visit github.com