Stage 03 · Host · Researched comparison
Best Go Database Migration Tools in 2026
goose is the first pick for most teams. It works as a standalone CLI and as an embeddable Go library, supports many databases, and is free under an open-source licence. golang-migrate suits teams that want a widely used CLI with many database drivers. Atlas fits teams that want declarative schema management and migration linting alongside versioned changes.
By Shihab Mia
Published 27 Nov 2026 · 7 tools compared
We run no ads and no affiliate links at launch. The order of a list follows our published method. See how we score.
Prices are the starting prices vendors list publicly. Plans change, so confirm the current price on the vendor page before you buy.
Key takeaways
- goose, golang-migrate and Atlas are all free or open source at their core, with Atlas offering paid cloud features.
- Most tools here run as a Go library, a CLI, or both, so you can pick based on your deployment model.
- Migration files are plain SQL or Go code, so keep them in version control and review them like any other code.
- Some tools offer hosted schema features; check whether your schema and connection strings leave your infrastructure before you adopt them.
Who each pick is for
- Teams wanting a CLI and embeddable Go library in one toolgoose
- Teams wanting a mature CLI with many database driversgolang-migrate
- Teams wanting declarative schema management and migration lintingAtlas
- Go projects using database/sql that want simple embedded migrationssql-migrate
- Teams wanting a single standalone CLI binary with no runtime dependencydbmate
- Polyglot teams that want one migration tool across languagesFlyway
- Teams wanting database-agnostic changelogs with rollback supportLiquibase
Comparison
| Tool | Best for | Standout feature | Listed starting price | Free plan or trial |
|---|---|---|---|---|
| 1goose | Teams wanting a CLI and embeddable Go library in one tool | Works as a CLI and as a library | Free (open source) | Free plan |
| 2golang-migrate | Teams wanting a mature CLI with many database drivers | Large set of supported databases | Free (open source) | Free plan |
| 3Atlas | Teams wanting declarative schema management and migration linting | Declarative and versioned workflows | See vendor pricing page | Free plan |
| 4sql-migrate | Go projects using database/sql that want simple embedded migrations | Simple embeddable library | Free (open source) | Free plan |
| 5dbmate | Teams wanting a single standalone CLI binary with no runtime dependency | Single binary with no Go runtime needed | Free (open source) | Free plan |
| 6Flyway | Polyglot teams that want one migration tool across languages | Works across many languages and databases | See vendor pricing page | Free plan |
| 7Liquibase | Teams wanting database-agnostic changelogs with rollback support | Database-agnostic changelog format | See vendor pricing page | Free plan |
How we picked
We picked tools that are currently maintained and that genuinely apply or manage database migrations for Go projects. Criteria were fit for the job, whether the tool ships as a CLI, a library or both, supported databases, licence and price model, and the main limits stated in vendor documentation and project repositories. We did not run benchmarks. Prices and plan limits change, so confirm them on the vendor site before you commit.
The tools, one by one
goose
Best for teams wanting a CLI and embeddable Go library in one tool

What it is and where it fits
goose is a database migration tool written in Go. You can run it as a command-line tool or import it as a library and call it from your application code. Migrations are written as SQL files or as Go functions, and each file carries an up and a down section so you can roll changes back.
It supports Postgres, MySQL, SQLite, ClickHouse, Turso/libSQL and other databases through its drivers. Because it is a library first, you can embed migrations in a binary and run them at startup, which suits containerized services. The project is open source and free to use.
Skip goose if you need declarative schema management or migration linting out of the box. It applies versioned migrations; it does not compare your schema to a target state for you.
Standout: Works as a CLI and as a library
Free (open source), as listed by the vendor (goose website). Confirm the current plan price before you buy.
Free plan. Plans change, so confirm on the vendor's pricing page before you buy.
Benefits
- Works as a CLI and as a library
- supports SQL and Go migrations
Drawbacks
- No built-in schema diffing
- fewer hosted features than some rivals
Skip it if this limit matters to you: no built-in schema diffing.
Verdict. A sensible pick for teams wanting a CLI and embeddable Go library in one tool.
Alternatives in this guide: golang-migrate, Atlas, sql-migrate
golang-migrate
Best for teams wanting a mature CLI with many database drivers

What it is and where it fits
golang-migrate is one of the most widely used migration tools in the Go ecosystem. It ships as a CLI and as a library, and it supports a long list of databases including Postgres, MySQL, SQLite, MongoDB, Cassandra and others through separate driver packages.
Migrations are plain SQL files named with a version prefix and a direction suffix. The tool tracks applied versions in a schema migrations table. You can run it from CI, from a container, or from application code.
It does not generate migrations for you, and it does not diff schemas. It is a focused tool: apply and roll back versioned SQL files. Teams that want migrations written as Go code should look at goose instead.
Standout: Large set of supported databases
Free (open source), as listed by the vendor (golang-migrate website). Confirm the current plan price before you buy.
Free plan. Plans change, so confirm on the vendor's pricing page before you buy.
Benefits
- Large set of supported databases
- usable as CLI or library
Drawbacks
- Migration files are up/down pairs only
- no Go-function migrations
Skip it if this limit matters to you: migration files are up/down pairs only.
Verdict. A sensible pick for teams wanting a mature CLI with many database drivers.
Alternatives in this guide: goose, Atlas, sql-migrate
Atlas
Best for teams wanting declarative schema management and migration linting

What it is and where it fits
Atlas is a database schema management tool with strong Go integration. It can work in a versioned mode, applying ordered migration files, or in a declarative mode, where you describe the desired schema and Atlas plans the changes. It also offers migration linting, so CI can catch destructive or risky changes before they run.
It supports Postgres, MySQL, MariaDB, SQLite and other databases, and it integrates with popular Go ORMs and migration frameworks. The core tooling is open source. Atlas also sells cloud and team features; check the vendor pricing page for current plans and limits.
Atlas is a good fit when schema review matters as much as applying changes. If you only need to run ordered SQL files, a simpler CLI may be enough.
Standout: Declarative and versioned workflows
See vendor pricing page, as listed by the vendor (Atlas website). Confirm the current plan price before you buy.
Free plan. Plans change, so confirm on the vendor's pricing page before you buy.
Benefits
- Declarative and versioned workflows
- migration linting and CI checks
Drawbacks
- Paid cloud features
- steeper learning curve than simple CLIs
Skip it if this limit matters to you: paid cloud features.
Verdict. A sensible pick for teams wanting declarative schema management and migration linting.
Alternatives in this guide: goose, golang-migrate, sql-migrate
sql-migrate
Best for go projects using database/sql that want simple embedded migrations

What it is and where it fits
sql-migrate is a lightweight migration library for Go. It works with the standard database/sql package and lets you embed SQL migration files into your binary using Go's embed support. It also ships a small CLI.
Migrations are SQL files with up and down sections. The library records applied migrations in a table and applies pending ones in order. It supports Postgres, MySQL, SQLite and other drivers that work with database/sql.
It is a good choice for small services that want migrations bundled into the app with minimal dependencies. It does not offer schema diffing, linting or a large driver matrix, so larger teams may outgrow it.
Standout: Simple embeddable library
Free (open source), as listed by the vendor (sql-migrate website). Confirm the current plan price before you buy.
Free plan. Plans change, so confirm on the vendor's pricing page before you buy.
Benefits
- Simple embeddable library
- works with database/sql
Drawbacks
- Smaller feature set
- less active than larger projects
Skip it if this limit matters to you: smaller feature set.
Verdict. A sensible pick for go projects using database/sql that want simple embedded migrations.
Alternatives in this guide: goose, golang-migrate, Atlas
dbmate
Best for teams wanting a single standalone CLI binary with no runtime dependency

What it is and where it fits
dbmate is a standalone CLI for database migrations. It is written in Go but distributed as a single binary, so you can drop it into CI or a container without a Go toolchain. It supports Postgres, MySQL, SQLite, ClickHouse and other databases.
Migrations are plain SQL files with a migrate and a rollback section. dbmate tracks versions in a schema migrations table and can dump the schema after applying changes. It reads the database URL from an environment variable, which keeps credentials out of the command line.
It is CLI only. If you want to run migrations from inside your Go application, use a library such as goose or sql-migrate instead.
Standout: Single binary with no Go runtime needed
Free (open source), as listed by the vendor (dbmate website). Confirm the current plan price before you buy.
Free plan. Plans change, so confirm on the vendor's pricing page before you buy.
Benefits
- Single binary with no Go runtime needed
- simple SQL migration files
Drawbacks
- CLI only, no Go library
- limited to versioned SQL migrations
Skip it if this limit matters to you: CLI only, no Go library.
Verdict. A sensible pick for teams wanting a single standalone CLI binary with no runtime dependency.
Alternatives in this guide: goose, golang-migrate, Atlas
Flyway
Best for polyglot teams that want one migration tool across languages
What it is and where it fits
Flyway is a migration tool that runs on the JVM and is not Go-specific, but it is commonly used alongside Go services because it works from CI and containers regardless of the application language. It supports a wide range of databases and applies versioned SQL migrations with checksums to detect edited files.
The community edition is free and open source. Some database support and team features are in paid editions; check the vendor pricing page for the current split. The CLI requires a Java runtime.
Choose Flyway when one migration tool must cover services written in several languages. If your stack is Go only, a native Go tool is usually simpler to operate.
Standout: Works across many languages and databases
See vendor pricing page, as listed by the vendor (Flyway website). Confirm the current plan price before you buy.
Free plan. Plans change, so confirm on the vendor's pricing page before you buy.
Benefits
- Works across many languages and databases
- strong versioned migration model
Drawbacks
- JVM-based CLI
- some database support is in paid editions
Skip it if this limit matters to you: JVM-based CLI.
Verdict. A sensible pick for polyglot teams that want one migration tool across languages.
Alternatives in this guide: goose, golang-migrate, Atlas
Liquibase
Best for teams wanting database-agnostic changelogs with rollback support

What it is and where it fits
Liquibase manages schema changes through a changelog written in SQL, XML, YAML or JSON. It is database-agnostic, so the same changelog can target different databases, and it supports rollback definitions per change set. It runs as a CLI, as a Java library, and through integrations with build tools.
The open-source core is free. Pro and enterprise editions add features such as policy checks and support; see the vendor pricing page. The CLI needs a Java runtime.
It suits teams that need one changelog format across several databases or strict rollback documentation. For a small Go service, the extra format overhead may not be worth it.
Standout: Database-agnostic changelog format
See vendor pricing page, as listed by the vendor (Liquibase website). Confirm the current plan price before you buy.
Free plan. Plans change, so confirm on the vendor's pricing page before you buy.
Benefits
- Database-agnostic changelog format
- built-in rollback support
Drawbacks
- XML/YAML changelogs add overhead
- JVM-based tooling
Skip it if this limit matters to you: XML/YAML changelogs add overhead.
Verdict. A sensible pick for teams wanting database-agnostic changelogs with rollback support.
Alternatives in this guide: goose, golang-migrate, Atlas
Who should use what
If you want migrations embedded in your Go binary, start with goose or sql-migrate. If you prefer a standalone CLI in CI, look at golang-migrate or dbmate. If schema review and linting matter, Atlas is the stronger fit. If one tool must cover services in several languages, Flyway or Liquibase make sense.
Questions to settle before you buy
What to check before you buy
- Confirm the tool supports your database and driver version.
- Decide whether you need a Go library, a CLI, or both, and check the tool ships that.
- Check how migrations are named and ordered, and whether down migrations are supported.
- Verify how credentials are passed and whether schema data leaves your infrastructure.
- Read the licence and pricing page, including limits on paid tiers, before adopting.
FAQ
Do I need a Go-specific migration tool?
No. Any migration tool that applies SQL works with a Go service. A Go-native tool is often simpler because you can embed it in the binary and avoid a separate runtime, but Flyway and Liquibase are common in polyglot setups.
Can I run migrations at application startup?
Yes, with libraries such as goose and sql-migrate. Running migrations at startup suits single-instance services. With multiple replicas, run migrations as a separate step so only one process applies them.
Are these tools free?
goose, golang-migrate, sql-migrate and dbmate are free and open source. Atlas, Flyway and Liquibase have free or open-source cores plus paid editions. Check each vendor pricing page for current terms.
How do I keep migration credentials safe?
Pass database URLs through environment variables or a secrets manager, not command-line flags that show in process lists. For hosted schema tools, confirm what data is sent to the vendor before connecting production databases.
What is the difference between versioned and declarative migrations?
Versioned migrations are ordered files applied in sequence. Declarative tools compare the live schema to a target definition and plan the changes. Atlas supports both; goose, golang-migrate and dbmate are versioned only.
Sources we checked
Method: how we score · editorial policy.
Change log. First published 27 Nov 2026.