Database Migration Tool Options


Background

A bunch of my side projects use a database, and it is painful to manage the schema changes. I’m looking for a tool that can automate everything.

Criteria

  • PostgreSQL support - since that’s what I use for all my projects.
  • Free - since none of the side projects are money makers.
  • a single schema.sql file and it creates (and maybe runs) a migration to bring a database up to date.

At work, we use MySQL with a migrations directory, so a tool that supports both would be ideal.

Options

  • sqldef - source - 2.8K stars, Go, also supports MySQL and SQLite
  • pg-schema-diff - source - 750 stars, Go, from Stripe, only PostgreSQL
  • pgschema - source - 750 stars, Go, only PostgreSQL

Rejected

  • sql-migrate - source - 3.4K stars, Go, also MySQL and SQLite, uses a migrations directory and table.
  • tern - source - 1.2K stars, Go, migrations directory and table
  • pgroll - source - 6.3K starts, Go, only PostgreSQL, freemium, migration files
  • skeema - source - 1.4K starts, Go, MySQL only, freemium
  • results - source - alpha, Python
  • atlas - source- 8K stars, Go, supports lots of databases, declarative schema is paid feature
  • shmig - source - bash (!)
  • dbmate - source - 6.7K stars, Go, many databases, migrations directory and table
  • SchemaHero - source - 1.1K stars, Go, schemas in YAML, Kubernetes operator
  • gh-ost - source - targeted at data (vs schema) migrations, MySQL only, from Github
  • Sqitch - source - 3.1K stars, Perl, supports many databases, migrations are SQL files
  • migrate - source - 18K stars, Go, supports many databases, migration files and directory

To research

Date: 2026-02-07

Tags:  postgresql  research  database

Share: