manage your database schema as code

Used by
3000+ projects
Why Atlas

Database Schemas as Code

Define database schemas in declarative code. Use HCL, SQL or any ORM or language.


Supports all popular ORMs, such as GORM, Sequelize, Django, SQLAlchemy, Hibernate, and more.


Test your schemas and migrations using the Atlas testing framework.

Getting Started
ATLAS
HCL
SQL
table"users"{
schema=schema.main
column"id"{
null=false
type=int
}
column"first_name"{
null=true
type=varchar
}
column"last_name"{
null=true
type=varchar
}
primary_key{
columns=[column.id]
}
}
table"orders"{
schema=schema.main
column"id"{
null=false
type=int
}
column"name"{
null=true
type=varchar
}
column"user_id"{
null=false
type=int
}
column"product_id"{
null=false
type=int
}
primary_key{
columns=[column.id]
}
foreign_key"product_id"{
columns=[column.product_id]
ref_columns=[column.products.column.id]
on_update=NO_ACTION
on_delete=NO_ACTION
}
foreign_key"user_id"{
columns=[column.user_id]
ref_columns=[table.users.column.id]
on_update=NO_ACTION
on_delete=NO_ACTION
}
}
table"products"{
schema=schema.main
column"id"{
null=false
type=int
}
column"name"{
null=true
type=varchar
}
column"description"{
null=false
type=int
}
column"quantity"{
null=false
type=int
}
primary_key{
columns=[column.id]
}
}
schema"main"{
}

Automatic Migration Planning

Define the desired state of your schema, and let Atlas automatically plan the SQL migrations. Like Terraform, but for databases.


Standardize schema changes using policies, regardless of the database or the ORM used.


Works with existing schema migration tools like Flyway, Liquibase, or migrate.

Planning Quick start

Verify Migration Safety in CI

Prevent destructive and backward-incompatible changes, or schema migrations that might fail or lock the database before they reach production.


Automate and customize reviews and approvals using policies.

GitHub Action Quick start
GitLab CI Quick start
CI RUN
#85485452
ISSUES FOUND
Repo
ariga/demo
Branch
new-t
Commit
c725c63
Summary
SQL Change
ERD
Migration Integrity check
Detect New Migration Files
Analyze Schema Changes
2 reports were found in analysis

Deploy to production with modern tooling

Atlas seamlessly integrates with modern deployment tools like Kubernetes and Terraform to make it easy to deploy your database migrations to production as part of your existing CD process.


Terraform Quick start
ArgoCD Quick start

Full visibility and control on your databases

Gain full visibility into the databases in your development and production environments with detailed logs and troubleshooting capabilities.


Prevent schema drift in production by detecting manual and accidental changes to your database.

Atlas Cloud Quick start
CI RUN
#85485452
ISSUES FOUND
Branch
Main
Updated at
a minute ago
ERD
Search

The most advanced migration tool out there

See how Atlas compares with classic migration tools like Liquibase, Flyway and others

vs

ORMs

More guides
All guides

Modern Database CI/CD

Learn how to apply modern CI/CD principles to database management using Atlas

Read

Integration tests with docker-compose

Prepare your database for integration tests using docker-compose

Read

Functional Indexes in MySQL

Learn how to optimize queries containing expressions by indexing values that are not stored directly in the table itself

Read

Using Atlas with Fly.io

Learn how Atlas can be used to perform database schema migrations for Fly.io deployment processes

Read

Manage MySQL on RDS with Terraform and Atlas

Learn how to use the Atlas Terraform Provider to manage the schema of an RDS-managed MySQL database

Read

Automatic migration planning for golang-migrate

Use Atlas to automatically plan schema migrations based on your schema's desired state

Read
Trusted by engineers at

Newsletter

Learn more about Atlas and get updates

Find us

Discover