Database schema as code: plan, lint, test and apply schema migrations, like Terraform for databases
open coreApache-2.0free
A schema migration tool from Ariga that manages database schemas as code, in SQL or HCL. It inspects databases, plans migrations from the desired schema (declaratively) or generates versioned migration files, and checks each change for data loss, table locks and breaking changes before it's applied. It integrates with ORMs, CI/CD pipelines, Kubernetes (the Atlas Operator) and Terraform. The Community Edition is a minimal Apache 2.0 build; the standard CLI is free to use on the Starter plan, and Atlas Pro adds migration linting, testing, CI/CD integration, drift detection and schema policies.
Problems it solves
- generate database migrations from my schema file instead of writing them by hand
- catch a migration that would lock a big table before it reaches production
- keep the production database schema from drifting from what's in git
- manage the schemas of thousands of tenant databases at once
Features
- declarative schema migrations from SQL or HCL
- versioned migration files generated from schema changes
- migration linting for data loss, locks and breaking changes
- schema drift detection
- Kubernetes operator and Terraform provider
- ORM integrations
- schema testing framework
Limitations
- Migration linting, testing and CI/CD integration need Atlas Pro; the Apache 2.0 Community Edition is a minimal build1
Ways to run it
Community Edition
free2
Not included
- many commands, drivers and integrations of the standard distribution
- Atlas Pro features
Atlas Starter
Only in this edition
- the standard distribution's database features and integrations
Not included
- Atlas Pro's CI/CD integration, linting, drift detection and governance
Atlas Pro
$9 per developer per month plus usage-based pricing for CI/CD pipelines and databases3
Only in this edition
- automated CI/CD integration
- migration linting and safety checks
- drift detection and monitoring
- schema policy and governance
- audit trails
Atlas Enterprise
custom, per database3
Only in this edition
- SSO
- audit logs and log forwarding
- air-gapped network deployment
- offline licences for CI/CD
- premium support with a custom SLA
Alternatives
The same job
These do what Atlas does.
- Bytebase The standard for database governance
- golang-migrate Database migrations as a CLI and Go library
- sqldef Idempotent schema management in plain SQL for MySQL, PostgreSQL, SQLite and SQL Server
- Reylo Import .sql files into TypeScript with types inferred from your live database, plus SQL-first migrations
- pgschema Terraform-style declarative schema migrations for PostgreSQL: dump, edit, plan, apply
- dbmate A lightweight, framework-agnostic database migration tool for plain SQL migrations
