finds.dev← search

// the find

amacneil/dbmate

★ 6,945 · Go · MIT · updated Jun 2026

🚀 A lightweight, framework-agnostic database migration tool.

dbmate is a standalone CLI migration tool that uses plain SQL files and works with any language or framework. It covers Postgres, MySQL, MariaDB, SQLite, ClickHouse, BigQuery, and Spanner. If you're running multiple services in different languages and want one migration tool that isn't tied to any ORM, this is the sensible pick.

Plain SQL migrations — no DSL to learn, no ORM coupling, and the files are readable by anyone. Timestamp-versioned filenames sidestep the sequential-number conflicts that plague multi-developer teams. The schema.sql dump on every migrate/rollback is genuinely useful for code review — you can see the full schema diff in a PR without running anything. The `--wait` flag and `dbmate wait` command are small but real quality-of-life features for Docker-based dev setups where the DB isn't immediately ready.

Out-of-order migration detection is opt-in via `--strict`; without it, dbmate silently applies migrations in any order, which can mask real problems in long-lived branches. Rolling back requires manually writing `-- migrate:down` sections — there's no auto-generation, so in practice teams often leave them empty and lose rollback capability. The schema dump depends on external binaries (`pg_dump`, `mysqldump`, `sqlite3`) being in PATH; if they're missing, dbmate silently skips the dump during `up` and `migrate`, which means you can run migrations for weeks and never notice the schema file is stale. BigQuery and Spanner support feel bolted on — Spanner's PostgreSQL-dialect-only restriction and the PGAdapter requirement make it a narrow use case.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →