dbmate
Dbmate is a lightweight, language-agnostic database migration tool written in Go that manages schema changes across MySQL, PostgreSQL, SQLite, and ClickHouse. It uses plain SQL for migrations, avoids lock-in to specific frameworks, and distributes as a single self-contained binary.
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Repository | amacneil/dbmate |
| Owner | amacneil |
| Primary language | Go |
| License | MIT — OSI-approved |
| Stars | 7k |
| Forks | 354 |
| Open issues | 50 |
| Latest release | v2.33.0 (2026-04-29) |
| Last updated | 2026-07-03 |
| Source | https://github.com/amacneil/dbmate |
What dbmate is
Dbmate is a CLI-based migration manager that timestamps migrations to avoid conflicts, runs them atomically within transactions, and tracks applied migrations in a database table. It supports multiple database backends via standard Go SQL drivers and can be embedded as a library or used standalone.
Get the dbmate source
Clone the repository and explore it locally.
git clone https://github.com/amacneil/dbmate.gitcd dbmate# follow the project's README for install & configurationNeed it deployed, integrated, or customized instead? DEV.co ships production installs.
Best use cases
Implementation considerations
- Set DATABASE_URL via environment variable or .env file; ensure credentials are URL-encoded and connection strings use correct protocol prefix (postgres, mysql, sqlite, etc.).
- Migrations run atomically in transactions; verify your database supports DDL transactions (note: some DDL operations in MySQL/MariaDB may not be transactional).
- Timestamp-based versioning prevents merge conflicts in multi-developer scenarios; ensure all developers' system clocks are reasonably synchronized.
- Schema.sql auto-dump on migrate/rollback can be disabled with --no-dump-schema; coordinate team policy on whether schema.sql is committed to git.
- Docker deployment requires --network=host or bind-mount configuration to access databases; test connectivity carefully in containerized environments.
When to avoid it — and what to weigh
- ORM-Driven Development — If your workflow relies on ORM auto-migration features (e.g., Hibernate, TypeORM, Sequelize), adding a separate CLI tool increases operational burden rather than reducing it.
- Enterprise Multi-Database Vendor Lock-in — If you require Oracle, SQL Server, or other enterprise databases not listed in supported drivers (MySQL, PostgreSQL, SQLite, ClickHouse, BigQuery, Spanner), dbmate lacks official support.
- Complex Rollback Requirements — If your migrations require complex conditional rollback logic, feature flags, or zero-downtime deployment strategies, dbmate's basic rollback model may be insufficient.
- SaaS Observability & Audit Trails — If you need centralized migration audit logs, team approvals, or SaaS-based monitoring, dbmate is intentionally offline-first and does not offer these services.
License & commercial use
Licensed under MIT (Massachusetts Institute of Technology License), a permissive OSI-approved license allowing unrestricted use, modification, and distribution with minimal restrictions.
MIT license explicitly permits commercial use. No proprietary vendor tie-in, SaaS upsell, or usage restrictions. However, verify your organization's license compliance policy and ensure any modifications remain appropriately documented.
DEV.co evaluation signals
Editorial assessment — not user reviews. Directional, with an explicit confidence level.
| Signal | Assessment |
|---|---|
| Maintenance | Active |
| Documentation | Strong |
| License clarity | Clear |
| Deployment complexity | Low |
| DEV.co fit | Strong |
| Assessment confidence | High |
No inherent security vulnerabilities disclosed in provided data. Standard considerations: credentials passed via DATABASE_URL or .env files should never be committed to version control; use environment secrets in CI/CD systems. Dbmate does not provide encryption, audit logging, or role-based access control—rely on database-level controls. Validate migration file integrity, especially if migrations are auto-generated or imported from untrusted sources.
Alternatives to consider
Flyway
JVM-based, supports more databases (Oracle, SQL Server), offers commercial products; heavier footprint, language-specific ecosystem.
Liquibase
XML/YAML/SQL-based, extensive enterprise features, version control; steeper learning curve, more overhead for small projects.
Alembic (Python) / Migrate (Rails) / TypeORM Migrations
Framework-native, tightly integrated with ORMs; language-specific, less portable across polyglot teams.
Build on dbmate with DEV.co software developers
Dbmate is ideal for polyglot teams seeking a lightweight, language-agnostic migration solution. Assess fit against your ORM strategy, database backends, and CI/CD tooling. Consider Flyway or Liquibase for enterprise databases and advanced rollback workflows.
Talk to DEV.coRelated open-source tools
Surfaced by semantic similarity across the DEV.co open-source index.
Related on DEV.co
Explore the category and the services that help you build with it.
dbmate FAQ
Can I use dbmate with an ORM like Sequelize or TypeORM?
Does dbmate support rollback of failed migrations?
What happens if two developers create migrations with the same timestamp?
Can I use dbmate for BigQuery or Spanner?
Custom software development services
Adopting dbmate is usually one piece of a larger software development effort. As a software development agency, DEV.co provides software development services and web development expertise — pairing senior software developers and web developers with your team to design, build, and operate open-source databases software in production.
Evaluate Dbmate for Your Schema Management Strategy
Dbmate is ideal for polyglot teams seeking a lightweight, language-agnostic migration solution. Assess fit against your ORM strategy, database backends, and CI/CD tooling. Consider Flyway or Liquibase for enterprise databases and advanced rollback workflows.