# dbmate

> A lightweight, framework-agnostic database migration tool for plain SQL migrations

Source: https://talira.ai/catalog/dbmate-q0nv00j1
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Command-line tool, Library
- Categories: [developer tools / database / migrations](https://talira.ai/categories/developer-tools/database/migrations)
- Platforms: macos, linux, windows[^2]
- Licence: MIT[^1]
- Pricing: Free and open source[^1]
- Pricing notes: Free and open source.
- Free tier: yes[^1]
- Backed by: [Adrian Macneil](https://talira.ai/orgs/amacneil.md)

dbmate is a standalone command-line tool that runs plain SQL migrations, so it works the same with Go, Node.js, Python, Ruby, PHP, Rust or any other language. Migrations are timestamp-versioned, so developers don't collide on version numbers, and each runs in a transaction. It supports [PostgreSQL](https://talira.ai/catalog/postgresql-cm55wcnd.md), [MySQL](https://talira.ai/catalog/mysql-dy4scprm.md), MariaDB, [SQLite](https://talira.ai/catalog/sqlite-cys3nt23.md), ClickHouse, BigQuery and Spanner, reads the connection URL from `DATABASE_URL` or a `.env` file, can create and drop databases, waits for the database to come up, and writes a `schema.sql` file to diff schema changes in git. It's a single binary, and also a Go library that can embed migrations.

## Links

- GitHub: https://github.com/amacneil/dbmate

## Problems it solves

- a simple framework-agnostic tool to run plain SQL migrations for any language
- run SQL migrations from a single binary without pulling in an ORM
- keep a schema.sql file in git that shows every schema change

## Features

- Plain SQL migrations
- Timestamp-versioned migrations
- Each migration in a transaction
- Rollback
- schema.sql export
- Create and drop databases
- Wait for the database
- Go library with embedded migrations
- Docker image

## Trust

Overall: 0.68 out of 1.
Signals: maintenance 1.00, adoption 0.78, momentum 0.53, community 0.79, backing 0.30, extensibility 0.00.

- last commit 8 days ago
- 60 commits in the last 90 days
- latest release v2.38.2 10 days ago
- 7.6k GitHub stars
- 93 contributors
- backed by Adrian Macneil

## Alternatives

- [golang-migrate](https://talira.ai/catalog/golang-migrate-pey7g13m.md): Database migrations as a CLI and Go library
- [Atlas](https://talira.ai/catalog/atlas-vjsak9tx.md): Database schema as code: plan, lint, test and apply schema migrations, like Terraform for databases
- [sqldef](https://talira.ai/catalog/sqldef-0273hr6q.md): Idempotent schema management in plain SQL for MySQL, PostgreSQL, SQLite and SQL Server
- [pgroll](https://talira.ai/catalog/pgroll-gdjd3cnf.md): Zero-downtime, reversible schema migrations for Postgres
- [Reylo](https://talira.ai/catalog/reylo-0v2g7263.md): Import .sql files into TypeScript with types inferred from your live database, plus SQL-first migrations
- [goose (database migrations)](https://talira.ai/catalog/goose-database-migrations-cbmxye2d.md): Database migration tool for SQL files and Go functions

## Sources

[^1]: https://github.com/amacneil/dbmate/blob/main/LICENSE (checked 25 Nov 2026)
[^2]: https://github.com/amacneil/dbmate#installation (checked 25 Nov 2026)
