FluentMigrator vs sqlx-cli
FluentMigrator
fluentmigrator.github.iosqlx-cli
github.comSide by side
| Figure | FluentMigrator | sqlx-cli |
|---|---|---|
| Price from | Free | Free |
| Free plan | Yes | Yes |
| Free trial | — | — |
| Open source | — | — |
| Windows | Yes | Yes |
| macOS | Yes | Yes |
| Linux | Yes | Yes |
| Self-hosted | Yes | — |
| Plans published | 1 | 1 |
| Spec score · Database Migration Tools | 8.2 (#10) | 8.0 (#11) |
| Database support | The documentation lists providers including SQL Server, PostgreSQL, MySQL, SQLite, Oracle, Firebird, IBM DB2, SAP HANA, Snowflake, and Redshift. | Its default installation supports the databases supported by SQLx; installation options include PostgreSQL-only and SQLite-specific configurations. |
| License | The project is released under the Apache-2.0 License. | The SQLx repository lists Apache-2.0 and MIT license files. |
| Purpose | FluentMigrator is a .NET framework for managing database schema changes through version-controlled C# migrations. | SQLx CLI is a command-line utility for managing databases and migrations and enabling offline mode for SQLx query macros. |
| Support | The project points users to GitHub Discussions, bug reports and feature requests, and the fluent-migrator Stack Overflow tag. | The SQLx repository links to its FAQ and Discord community for questions. |
Plans
In their own words
FluentMigrator
FluentMigrator is a free .NET framework for managing database schema changes with version-controlled C# migrations. Its fluent C# API defines Up and Down methods for applying changes and rolling them back. The project lists providers for SQL Server, PostgreSQL, MySQL, SQLite, and Oracle, among others; provider packages are selected separately. Migrations can run inside an application, with the Migrate.exe console tool, or through dotnet-fm, which integrates with the cross-platform .NET CLI. By default, FluentMigrator creates a VersionInfo table to record completed migrations. Command-line runners can preview generated SQL without executing it, and the CLI can validate migrations before execution. The project documents .NET dependency injection integration and CI/CD examples for GitHub Actions, Azure DevOps, and Jenkins. The Quick Start calls for .NET 8.0 or later, a supported database, and basic C# and database knowledge. FluentMigrator is released under the Apache-2.0 License, with releases distributed through NuGet.
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.