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.

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 migration tools like Flyway, Liquibase, or migrate.

Planning Quick start

Verify Migration Safety in CI

Prevent destructive and backward-incompatible changes, or 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 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
More guides
All guides

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

How to inspect a local database using Atlas Cloud

Inspect and generate an Entity Relationship Diagram (ERD) from your 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 engineeers at

Newsletter

Learn more about Atlas and get updates

Find us

Discover