dbmate Review (2026): Pricing, Features & Honest Verdict
TLDR
dbmate is a lightweight, framework-agnostic database migration tool using plain SQL files, supporting PostgreSQL, MySQL, SQLite, and ClickHouse with up/down migrations. Best for: developers wanting simple, ORM-free migrations. Price: Free (open-source). Rating: 7.6/10
What is dbmate?
dbmate is a database migration tool that uses plain SQL migration files with a simple CLI interface. It is deliberately minimal: no ORM integration, no schema introspection, no code generation. You write SQL migration files (with up and down sections), and dbmate applies them in order. This simplicity makes dbmate usable with any programming language, framework, or ORM since it operates at the SQL level.
The tool was created by Adrian Macneil as a lightweight alternative to framework-specific migration tools. Where Prisma Migrate, Drizzle Kit, and Rails migrations are tied to their respective ecosystems, dbmate works with anything that uses a SQL database. This makes it particularly valuable for polyglot teams, microservices architectures, and projects that might change ORMs over time.
Key Features
Plain SQL Migrations
Migration files are plain SQL with special comment markers separating the “up” and “down” sections. No DSL, no code, just the SQL you want to execute. This means you have full access to all SQL features of your database (CTEs, window functions, stored procedures) without worrying about what the migration tool supports.
Up and Down Migrations
Each migration file contains both the forward (up) and rollback (down) SQL. Running dbmate up applies pending migrations; dbmate rollback reverses the last migration. Having rollback capability in every migration file makes it safe to iterate on schema changes during development.
Database URL Configuration
dbmate uses a standard DATABASE_URL environment variable for connection configuration. The URL format (postgres://user:pass@host:port/dbname) is the same convention used by Rails, Django, and most ORMs. This means no additional configuration is needed if your application already uses DATABASE_URL.
Schema Dump
dbmate can dump the current database schema to a file (db/schema.sql), providing a single-file representation of your database structure. This schema dump is useful for documentation, code review, and quickly understanding the current database state without reading through all migration files.
Multi-Database Support
dbmate supports PostgreSQL, MySQL, MariaDB, SQLite, and ClickHouse. The same migration file format works across databases (though the SQL content is database-specific). This is useful for projects that support multiple database backends.
Pricing
dbmate is free and open-source under the MIT license.
Pros and Cons
Pros
- Pure SQL migrations give full control without abstraction
- Framework and ORM agnostic
- Single binary with no runtime dependencies
- Built-in rollback support with down migrations
- Schema dump for documentation and review
Cons
- No automatic migration generation from schema changes
- Requires writing SQL manually for every change
- No schema diff or drift detection
- Less integrated than ORM-specific migration tools
- No support for data migrations or seeding
| Plan | Price | Plan Features | Best For |
|---|---|---|---|
| Open Source | Free | All features, MIT license | Everyone |
Who Should Use dbmate?
dbmate is ideal for teams that want full control over their database migrations without ORM coupling. It works particularly well in microservices architectures where different services use different languages/frameworks but share database infrastructure. The plain SQL approach also makes migrations reviewable by DBAs who do not know your application framework.
If you use Prisma, Drizzle, or another ORM with built-in migration tools, their integrated migration systems are more convenient. dbmate is for situations where ORM independence, SQL control, or multi-framework compatibility matters.
Alternatives
Flyway
Flyway is a mature database migration tool from Redgate supporting SQL and Java migrations. It is more feature-rich than dbmate with team collaboration features and a GUI. However, it requires the JVM and is heavier. Choose Flyway for enterprise environments; dbmate for simplicity.
golang-migrate
golang-migrate is another SQL-based migration tool popular in the Go ecosystem. It supports more databases than dbmate and has both CLI and library usage. The feature set is comparable; choose based on ecosystem preference.
Sqitch
Sqitch is a database change management tool that uses a dependency-based model rather than sequential migrations. It is more powerful for complex schema evolution but has a steeper learning curve. Choose Sqitch for complex dependency chains; dbmate for sequential simplicity.
FAQ
How does dbmate track applied migrations?
dbmate creates a schema_migrations table in your database that records which migrations have been applied. This is a standard approach shared by most migration tools.
Can dbmate work with existing databases?
Yes. Create a baseline migration that represents the current schema, mark it as applied (dbmate up will skip it), and start writing new migrations from there.
Does dbmate support transactions?
Yes. By default, each migration runs within a transaction. If a migration fails partway through, the changes are rolled back. You can disable transactions for specific migrations that require it (like adding indexes concurrently in PostgreSQL).
dbmate Pros & Cons
What We Like
- Pure SQL with full control
- Framework and ORM agnostic
- Single binary, no dependencies
- Built-in rollback with down migrations
- Schema dump for documentation
What Could Be Better
- No automatic migration generation
- Requires manual SQL for every change
- No schema diff or drift detection
- Less integrated than ORM tools
- No data migration or seeding
dbmate FAQ
How does dbmate track migrations?
Creates a schema_migrations table recording applied migrations. Standard approach.
Can dbmate work with existing databases?
Yes. Create baseline migration, mark as applied, then write new migrations from there.
Does dbmate support transactions?
Yes. Each migration runs in a transaction by default. Can be disabled per-migration.
What is dbmate?
Lightweight, framework-agnostic database migration tool that uses plain SQL files and supports PostgreSQL, MySQL, SQLite, and ClickHouse.
How much does dbmate cost?
dbmate pricing starts at Free (open-source). A free plan is available.
Is dbmate worth it?
dbmate is the best migration tool for teams that want simplicity and SQL control without ORM coupling. The single binary, plain SQL approach, and built-in rollbacks make it reliable and predictable. When you do not need automatic migration generation, dbmate is the cleanest option. We rate it 7.6/10.






