Modern schema workflows that scale with confidence
Codebase
Atlas understands your schema in any language
CREATE TABLE users (
id serial NOT NULL,
name varchar(255) NOT NULL,
email varchar(255) UNIQUE NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE user_logs (
id serial NOT NULL,
user_id int NOT NULL,
body text NOT NULL,
PRIMARY KEY (id),
CONSTRAINT user_fk FOREIGN KEY (user_id) REFERENCES users(id)
);
Support
Manage your database schema as code with Atlas
Migration
Atlas calculates the diff and plans safe migrations for you
verification
Atlas verifies schema changes using a rigorous, deterministic policy engine
Deployment
Deploy schema changes with confidence using our modern CI/CD pipeline
terraform {
required_providers {
atlas = {
source = "ariga/atlas"
version = "~> 0.9.7"
}
}
}
provider "atlas" {
dev_url = "docker://postgres/15/myapp"
}
data "atlas_schema" "sql" {
src = "file://${path.module}/schema.sql"
}
resource "atlas_schema" "postgres" {
url = "postgres://root:pass@localhost:5432/app?sslmode=disable"
hcl = data.atlas_schema.sql.hcl
}
$ terraform apply
data.atlas_schema.sql: Reading...
data.atlas_schema.sql: Read complete after 2s [id=p93KLX2q4UI326LN/4cssQ]
Terraform will perform the following actions:
# atlas_schema.postgres will be created
+ resource "atlas_schema" "postgres" {
+ hcl = <<-EOT
table "users" {
schema = schema.myapp
column "id" {
null = false
type = int
}
column "name" {
null = false
type = varchar(255)
}
primary_key {
columns = [column.id]
}
}
EOT
+ id = (known after apply)
+ url = (sensitive value)
}
Plan: 1 to add, 0 to change, 0 to destroy.
The following SQL statements will be executed:
CREATE TABLE users (
id SERIAL PRIMARY KEY,
name VARCHAR(255) NOT NULL
);
Monitoring
Track schema changes and detect drift to keep environments consistent
atlas-copilot
AI-powered assistant for effortless database operations
Chat with Atlas Copilot to set up your project fast
Iterate with Atlas to quickly resolve to ensure reliable migrations
Use free language to generate unit tests for your schema and migrations
Use Copilot to generate schema rules and predicates to govern schemas based on your guidelines
Modern, AI-powered CI/CD for schema changes