ForkBasetenBasetenpublished Apr 10, 2026seen 5d

basetenlabs/atlas

forked from ariga/atlas

Open original ↗

Captured source

source ↗
published Apr 10, 2026seen 5dcaptured 10hhttp 200method plain

basetenlabs/atlas

Description: Declarative schema migrations with schema-as-code workflows

License: Apache-2.0

Stars: 0

Forks: 0

Open issues: 0

Created: 2026-04-10T22:35:43Z

Pushed: 2026-04-10T12:36:43Z

Default branch: master

Fork: yes

Parent repository: ariga/atlas

Archived: no

README:

Atlas - Manage Your Database Schema as Code

Atlas is a language-agnostic tool for managing and migrating database schemas using modern DevOps principles. It offers two workflows:

  • Declarative: Similar to Terraform, Atlas compares the current state of the database to the desired state, as

defined in an [HCL], [SQL], or [ORM] schema. Based on this comparison, it generates and executes a migration plan to transition the database to its desired state.

  • Versioned: Unlike other tools, Atlas automatically plans schema migrations for you. Users can describe their desired

database schema in [HCL], [SQL], or their chosen [ORM], and by utilizing Atlas, they can plan, lint, and apply the necessary migrations to the database.

Supported Databases

PostgreSQL · MySQL · MariaDB · SQL Server · SQLite · ClickHouse · Redshift · Oracle · Snowflake · CockroachDB · TiDB · Databricks · Spanner · Aurora DSQL · Azure Fabric

Installation

macOS + Linux:

curl -sSf https://atlasgo.sh | sh

Homebrew:

brew install ariga/tap/atlas

Docker:

docker pull arigaio/atlas

NPM:

npx @ariga/atlas

See installation docs for all platforms.

Key Features

  • [Declarative schema migrations](https://atlasgo.io/declarative/apply): The atlas schema command offers various options for inspecting, diffing, comparing, planning and applying migrations using standard Terraform-like workflows.
  • [Versioned migrations](https://atlasgo.io/versioned/intro): The atlas migrate command provides a state-of-the-art experience for planning, linting, and applying migrations.
  • [Schema as Code](https://atlasgo.io/atlas-schema): Define your desired database schema using [SQL], [HCL], or your chosen [ORM]. Atlas supports 16 ORM loaders across 6 languages.
  • [Security-as-Code](https://atlasgo.io/guides/postgres/security-declarative): Manage roles, permissions, and row-level security policies as version-controlled code.
  • [Data management](https://atlasgo.io/atlas-schema/sql): Manage seed and lookup data declaratively alongside your schema.
  • [Cloud-native CI/CD](https://atlasgo.io/integrations): Kubernetes operator, Terraform provider, GitHub Actions, GitLab CI, ArgoCD, and more.
  • [Testing framework](https://atlasgo.io/testing/schema): Unit test schema logic (functions, views, triggers, procedures) and migration behavior.
  • [50+ safety analyzers](https://atlasgo.io/lint/analyzers): Database-aware migration linting that detects destructive changes, data-dependent modifications, table locks, backward-incompatible changes, and more.
  • [Multi-tenancy](https://atlasgo.io/guides/multi-tenancy): Built-in support for multi-tenant database migrations.
  • [Drift detection](https://atlasgo.io/monitoring): Monitoring as Code with automatic schema drift detection and remediation.
  • [Cloud integration](https://atlasgo.io/guides/deploying/secrets): IAM-based authentication for AWS RDS and GCP Cloud SQL, secrets management via AWS Secrets Manager, GCP Secret Manager, HashiCorp Vault, and more.

Getting Started

Get started with Atlas by following the Getting Started docs.

Inspect an existing database schema:

atlas schema inspect -u "postgres://localhost:5432/mydb"

Apply your desired schema to the database:

atlas schema apply \
--url "postgres://localhost:5432/mydb" \
--to file://schema.hcl \
--dev-url "docker://postgres/16/dev"

📖 Getting Started docs

Migration Linting

Atlas ships with 50+ built-in analyzers that review your migration files and catch issues before they reach production. Analyzers detect destructive changes like dropped tables or columns, data-dependent modifications such as adding non-nullable columns without defaults, and database-specific risks like table locks and table rewrites that can cause downtime on busy tables. You can also define your own custom policy rules.

atlas migrate lint --dev-url "docker://postgres/16/dev"

Schema Testing

Test database logic (functions, views, triggers, procedures) and data migrations with .test.hcl files:

test "schema" "postal" {
# Valid postal codes pass
exec {
sql = "SELECT '12345'::us_postal_code"
}
# Invalid postal codes fail
catch {
sql = "SELECT 'hello'::us_postal_code"
}
}

test "schema" "seed" {…

Excerpt shown — open the source for the full document.

Notability

notability 1.0/10

Routine fork, low impact