EVERYTHING XIAOMI
Get listed

Refinery

Refinery is a free, MIT-licensed SQL migration toolkit for Rust applications.

Place
#19 of 73
Score
6.2
Refinery's website

What Refinery is

Refinery is a free, MIT-licensed SQL migration toolkit for Rust applications. It runs migrations using a database connection provided by the application, either from embedded Rust code or through the refinery_cli command-line tool. Migration definitions can be SQL files or Rust modules whose migration function returns a String. Refinery records applied versions and metadata, then checks for missing or divergent migrations before running unapplied ones. Each migration runs in its own transaction by default; grouped mode can put all migrations in one transaction. Migrations can also be embedded in a binary, eliminating separate migration files at deployment. Listed drivers include postgres, tokio-postgres, mysql, mysql_async, rusqlite, and tiberius. SQLx can be used with a Config that implements Migrate. Driver selection uses features, and maintainers point to external repositories for additional drivers. The project aims to support stable Rust, the previous Rust version, and nightly. To reverse an applied change, users create a new migration containing the reversing changes. Migration versions default to signed 32-bit integers; 64-bit versions require enabling the int8-versions feature before using the database.

Good

  • Free and MIT-licensed.
  • Supports SQL files and Rust migration modules.
  • Tracks versions and checks for divergent migrations.
  • Migrations can be embedded in a binary.
  • Grouped mode can run migrations in one transaction.

Watch out

  • Rollback requires a new reversing migration.
  • 64-bit versions must be enabled before database use.
  • Additional drivers may be maintained externally.

Who it suits

Refinery is for Rust developers who need to manage SQL migrations against a database connection. It suits projects that want embedded migrations or command-line execution and a listed driver or SQLx configuration.

Verdict

Refinery offers migration tracking and multiple execution formats for Rust projects, with transaction options and binary embedding. Plan for explicit reverse migrations and check driver support before choosing it.

Plans and prices

From Refinery's own pricing page, checked 4 Oct 2026.

All about pricing
PlanPriceWhat it gives you
RefineryFreeMIT-licensed SQL migration toolkit · database drivers must be selected as features

The facts

Each one read from Refinery's own pages, with the date it was checked.

What it does

Additional drivers
The maintainers say limited bandwidth favors maintaining additional database drivers in external repositories; the README names Klickhouse as an example.checked 4 Oct 2026
Embedded migrations
The project can bake migrations into a binary so no additional files are needed when deployed.checked 4 Oct 2026
License
The project is licensed under the MIT License.checked 4 Oct 2026
Migration formats
Migrations can be SQL files or Rust modules with a migration function that returns a String.checked 4 Oct 2026
Migration tracking
Refinery records applied migration versions and metadata, then checks for divergent or missing migrations before executing unapplied ones.checked 4 Oct 2026
Purpose
Refinery is a SQL migration toolkit for Rust that runs migrations on a provided database connection.checked 4 Oct 2026
Rollback
To undo a migration, users must create a new migration and write the changes that reverse it.checked 4 Oct 2026
Run modes
Migrations can be embedded in Rust code or run through the refinery_cli command-line tool.checked 4 Oct 2026
Rust support
The project aims to support stable Rust, the previous Rust version, and nightly.checked 4 Oct 2026
Source availability
The project is published as a public GitHub repository.checked 4 Oct 2026
SQLx
The README says SQLx can be used by providing a Config that implements Migrate.checked 4 Oct 2026
Supported drivers
The README lists postgres, tokio-postgres, mysql, mysql_async, rusqlite, and tiberius as supported drivers.checked 4 Oct 2026
Transactions
By default, each migration runs in its own transaction; grouped mode can wrap all migrations in one transaction.checked 4 Oct 2026
Version limit
Migration versions default to signed 32-bit integers; the int8-versions feature enables 64-bit versions and must be enabled before use on a database.checked 4 Oct 2026

Alternatives to Refinery

All alternatives
  1. 1Binary Ninja logo

    Binary Ninja

    Free planWebAPILinuxmacOS
    7.8$199 one-time
  2. 2

    Frida

    Free planOpen sourceAndroidiOSAPILinux
    7.7Free plan
  3. 3rev.ng logo

    rev.ng

    Free planOpen sourceWebAPILinuxmacOS
    7.7Free plan
  4. 4JEB logo

    JEB

    Free planAPILinuxmacOSSelf-hosted
    7.6From $1,200 a year
  5. 5

    Ghidra

    Free planOpen sourceAPIExtensionLinuxmacOS
    7.3Free plan
  6. 6IDA Pro logo

    IDA Pro

    Free planLinuxmacOSWindows
    7.0From $1,099 a year