SchemaHero

SchemaHero is a free, open-source database schema migration tool that turns declared YAML schemas into SQL changes. Its CLI compares the database’s current structure with the desired definition and displays the SQL during a plan phase; apply executes those changes. Since the tool calculates the required SQL from the current and intended schemas, it does not depend on numbered migration files. The CLI works on its own, and users can optionally deploy a Kubernetes Operator. The operator can create migration resources and support approval or rejection workflows. SchemaHero supports PostgreSQL, MySQL, CockroachDB, TimescaleDB, Cassandra, SQLite, and RQLite. Table definitions can specify columns, keys, indexes, foreign keys, defaults, and constraints. Installation options include binaries for macOS, Linux, and Windows, Docker, and optional Kubernetes deployment. Documentation covers CI workflows for GitHub Actions and GitLab CI, along with GitOps integrations for Argo CD and Flux. Migration policies can flag destructive changes such as dropping tables or columns and fail CI checks.

Who it is for

SchemaHero suits developers and teams managing database schemas through YAML definitions, including teams using CI or GitOps workflows. Its standalone CLI is an option when Kubernetes is not in use.

What is good

  • Plan displays SQL without changing the database.
  • CLI works without Kubernetes.
  • Supports seven listed database engines.
  • Can flag destructive changes in CI checks.
  • Available as binaries and a Docker image.

What to know first

  • Rollback support is not listed as available.
  • The Kubernetes Operator is optional, not part of the standalone CLI.

Verdict

SchemaHero offers a declarative plan-and-apply workflow across several database engines, with options for CI and Kubernetes use. Teams that need rollback support should note that it is not listed as available.

Compared on database migration tools

Free plan
Yes
Rollback support
No
Schema diff
Yes
CI/CD automation
Yes
Drift detection
Yes
Self-hosted option
Yes
Migration format
mixed

Best SchemaHero alternatives

See all 12