# Atlas > Atlas is a database schema-as-code tool: like Terraform, for databases. Define your schema in SQL, HCL, > or your ORM (SQLAlchemy, Django, Prisma, Drizzle, TypeORM, Sequelize, Hibernate, Ent, GORM, EF Core, > Doctrine), and Atlas diffs, plans, lints, tests, and applies safe migrations, declarative or versioned. > The same as-code workflow shifts the whole database left: Security as Code (roles, users, and permissions), > Data as Code (declarative seed and reference data), and Monitoring as Code (drift detection with > auto-remediation). Supports PostgreSQL, MySQL, MariaDB, SQLite, SQL Server, ClickHouse, Oracle, Snowflake, > Spanner, Redshift, Databricks, and more. Documentation: https://atlasgo.io ## Terms - Content on atlasgo.io is Copyright Ariga Technologies. All rights reserved. Use is governed by the website Terms of Use: https://ariga.io/legal/tos - The documentation is provided for using and evaluating Atlas and for educational purposes. Using it to build or support products or services that compete with Ariga or Atlas is not permitted. - Atlas binaries are distributed under the Master License and Services Agreement (MSA), which prohibits using the Software to build or support products or services that compete with Ariga or Atlas: https://ariga.io/legal/msa ## Schema as Code - [Schema as Code](https://atlasgo.io/atlas-schema): Define the desired state of your database and compose schemas like Terraform modules. - [HCL syntax](https://atlasgo.io/atlas-schema/hcl): The Atlas HCL schema language: tables, columns, indexes, foreign keys, views, functions, triggers. - [SQL schema](https://atlasgo.io/atlas-schema/sql): Define the desired schema in plain SQL DDL. - [External schemas and ORMs](https://atlasgo.io/atlas-schema/external): Load the desired state from ORMs and external programs. - [Monitoring as Code](https://atlasgo.io/monitoring): Monitor live databases for schema drift, permission mismatches, and policy violations. - [Drift detection](https://atlasgo.io/monitoring/drift-detection): Detect drift and generate the SQL to bring databases back in line. ## Configuration - [Project configuration](https://atlasgo.io/atlas-schema/projects): The atlas.hcl project file: environments, variables, migration and lint settings. - [Data sources](https://atlasgo.io/atlas-schema/projects#data-sources): Load configuration and schema state from external sources in atlas.hcl. - [Input variables](https://atlasgo.io/atlas-schema/input-variables): Parameterize schemas and project files with typed variables. - [HCL column types](https://atlasgo.io/atlas-schema/hcl-types): The column type registry for every supported engine. ## Security as Code - [Security as Code](https://atlasgo.io/guides/security-as-code): Manage roles, users, and permissions as code; Atlas diffs, plans, and applies the changes. - [PostgreSQL declarative security](https://atlasgo.io/guides/postgres/security-declarative): Roles and permissions as code for PostgreSQL, declarative workflow. - [PostgreSQL versioned security](https://atlasgo.io/guides/postgres/security-versioned): Roles and permissions as code for PostgreSQL, versioned workflow. - [PostgreSQL default privileges](https://atlasgo.io/guides/postgres/security-default-privileges): Manage default privileges as code. - [MySQL security](https://atlasgo.io/guides/mysql/security-declarative): Roles and permissions as code for MySQL. - [ClickHouse security](https://atlasgo.io/guides/clickhouse/security-declarative): Roles and permissions as code for ClickHouse. - [Oracle security](https://atlasgo.io/guides/oracle/security-declarative): Roles and permissions as code for Oracle. - [Snowflake security](https://atlasgo.io/guides/snowflake/security-declarative): Roles and permissions as code for Snowflake. ## Data as Code - [Data as Code](https://atlasgo.io/guides/seed-data-as-code): Declarative seed and reference data; Atlas generates the exact DML to sync desired and live state. - [PostgreSQL seed data](https://atlasgo.io/guides/postgres/seed-data): Seed and reference data as code for PostgreSQL. - [MySQL seed data](https://atlasgo.io/guides/mysql/seed-data): Seed and reference data as code for MySQL. - [ClickHouse seed data](https://atlasgo.io/guides/clickhouse/seed-data): Seed and reference data as code for ClickHouse. ## Testing - [Schema testing](https://atlasgo.io/testing/schema): Write tests for schema logic: functions, views, triggers, and queries. - [Migration testing](https://atlasgo.io/testing/migrate): Test data migrations: seed data, run tests, detect errors. - [Migration plan testing](https://atlasgo.io/testing/plan): Assert on the SQL Atlas plans before it runs. ## Workflows - [Getting started](https://atlasgo.io/getting-started): Install Atlas and run your first migration in under 5 minutes. - [Declarative workflow](https://atlasgo.io/declarative/apply): Apply the desired schema state directly; Atlas plans the migration for you. - [Declarative plan and review](https://atlasgo.io/declarative/plan): Pre-plan, review, and approve declarative changes before deployment. - [Schema diff](https://atlasgo.io/declarative/diff): Compare schemas: live databases, migration directories, HCL, SQL, or ORM state. - [Versioned workflow](https://atlasgo.io/versioned/intro): Migration files with automatic planning, linting, and CI/CD integration. - [Migration authoring](https://atlasgo.io/versioned/diff): Generate versioned migrations automatically by diffing desired and current state. - [Migration linting](https://atlasgo.io/versioned/lint): Detect destructive changes, backward-incompatibility, and unsafe operations before they run. - [Migration apply](https://atlasgo.io/versioned/apply): Execute pending migration files against target databases. - [Down migrations](https://atlasgo.io/versioned/down): Safely revert applied migrations. - [Lint analyzers](https://atlasgo.io/lint/analyzers): The full catalog of migration analyzers and checks. ## CI/CD and Integrations - [Versioned CI/CD setup](https://atlasgo.io/versioned/setup-cicd): End-to-end CI/CD for versioned migrations. - [Declarative CI/CD setup](https://atlasgo.io/declarative/setup-cicd): End-to-end CI/CD for declarative schema management. - [GitHub Actions](https://atlasgo.io/integrations/github-actions): Install Atlas, lint, plan, and deploy from GitHub Actions. - [GitLab CI](https://atlasgo.io/integrations/gitlab-ci-components): GitLab CI/CD components for Atlas. - [CircleCI](https://atlasgo.io/integrations/circleci-orbs): CircleCI orbs for Atlas. - [Bitbucket](https://atlasgo.io/integrations/bitbucket-pipes): Bitbucket pipes for Atlas. - [Azure DevOps](https://atlasgo.io/integrations/azure-devops): Azure DevOps extension for Atlas. - [Kubernetes Operator](https://atlasgo.io/integrations/kubernetes): Manage schemas from Kubernetes with the Atlas Operator. - [Terraform provider](https://atlasgo.io/integrations/terraform-provider): Plan and apply schema changes as part of your Terraform workflow. - [ArgoCD](https://atlasgo.io/guides/deploying/k8s-argo): GitOps migration deployment with ArgoCD and the Atlas Operator. - [ArgoCD declarative](https://atlasgo.io/guides/deploying/k8s-argo-declarative): Declarative schema management with ArgoCD. - [Flux CD](https://atlasgo.io/guides/deploying/k8s-flux): GitOps migration deployment with Flux. - [Helm](https://atlasgo.io/guides/deploying/helm): Deploy migrations as part of a Helm chart. - [Crossplane](https://atlasgo.io/guides/deploying/crossplane): Manage schemas with Crossplane compositions. - [Go SDK](https://atlasgo.io/integrations/go-sdk): Embed Atlas in Go programs with atlasexec. - [Deployment guides](https://atlasgo.io/guides/deploying/intro): Deploying migrations across Kubernetes, ECS, Fly.io, and more. - [All integrations](https://atlasgo.io/integrations): The full integrations catalog. ## Database Guides - [Supported databases](https://atlasgo.io/databases): The full per-engine feature and guide index. - [PostgreSQL](https://atlasgo.io/guides/postgres/automatic-migrations): Schema-as-code and automatic migration planning for PostgreSQL. - [MySQL](https://atlasgo.io/guides/mysql/mysql-automatic-migrations): Schema-as-code and automatic migration planning for MySQL and MariaDB. - [SQL Server](https://atlasgo.io/guides/mssql): Schema-as-code and automatic migration planning for SQL Server. - [ClickHouse](https://atlasgo.io/guides/clickhouse): Schema-as-code and automatic migration planning for ClickHouse. - [Oracle](https://atlasgo.io/guides/oracle/automatic-migrations): Schema-as-code and automatic migration planning for Oracle. - [Snowflake](https://atlasgo.io/guides/snowflake/automatic-migrations): Schema-as-code and automatic migration planning for Snowflake. - [Redshift](https://atlasgo.io/guides/redshift/automatic-migrations): Schema-as-code and automatic migration planning for Redshift. - [Spanner](https://atlasgo.io/guides/spanner/automatic-migrations): Schema-as-code and automatic migration planning for Google Spanner. - [Databricks](https://atlasgo.io/guides/databricks/automatic-migrations): Schema-as-code and automatic migration planning for Databricks. - [CockroachDB](https://atlasgo.io/guides/cockroachdb/automatic-migrations): Schema-as-code and automatic migration planning for CockroachDB. - [YugabyteDB](https://atlasgo.io/guides/yugabyte/automatic-migrations): Schema-as-code and automatic migration planning for YugabyteDB. - [Aurora DSQL](https://atlasgo.io/guides/dsql/automatic-migrations): Schema-as-code and automatic migration planning for Amazon Aurora DSQL. - [HorizonDB](https://atlasgo.io/guides/horizondb/automatic-migrations): Schema-as-code and automatic migration planning for HorizonDB. - [Custom drivers](https://atlasgo.io/custom-drivers): Builds with Oracle, Snowflake, Spanner, and Databricks drivers. ## HCL Dialect References - [Atlas HCL documentation](https://atlasgo.io/hcl/docs): The Atlas HCL language reference hub. - [PostgreSQL HCL](https://atlasgo.io/hcl/postgres): Every PostgreSQL object and attribute in the Atlas HCL language. - [MySQL HCL](https://atlasgo.io/hcl/mysql): Every MySQL object and attribute in the Atlas HCL language. - [MariaDB HCL](https://atlasgo.io/hcl/mariadb): Every MariaDB object and attribute in the Atlas HCL language. - [SQL Server HCL](https://atlasgo.io/hcl/mssql): Every SQL Server object and attribute in the Atlas HCL language. - [SQLite HCL](https://atlasgo.io/hcl/sqlite): Every SQLite object and attribute in the Atlas HCL language. - [ClickHouse HCL](https://atlasgo.io/hcl/clickhouse): Every ClickHouse object and attribute in the Atlas HCL language. - [Oracle HCL](https://atlasgo.io/hcl/oracle): Every Oracle object and attribute in the Atlas HCL language. - [Snowflake HCL](https://atlasgo.io/hcl/snowflake): Every Snowflake object and attribute in the Atlas HCL language. - [Redshift HCL](https://atlasgo.io/hcl/redshift): Every Redshift object and attribute in the Atlas HCL language. - [Spanner HCL](https://atlasgo.io/hcl/spanner): Every Google Spanner object and attribute in the Atlas HCL language. - [Databricks HCL](https://atlasgo.io/hcl/databricks): Every Databricks object and attribute in the Atlas HCL language. - [Configuration reference](https://atlasgo.io/hcl/config): The atlas.hcl configuration blocks reference. - [Functions](https://atlasgo.io/hcl/functions): Built-in functions available in Atlas HCL. - [Linting rules](https://atlasgo.io/hcl/rule): Author custom lint rules in HCL. - [Testing reference](https://atlasgo.io/hcl/testing): The schema and migration test block reference. - [Migration plan reference](https://atlasgo.io/hcl/plan): The plan file block reference. - [Agent configuration](https://atlasgo.io/hcl/agent): The Atlas Agent configuration reference. ## AI and Guides - [AI tools](https://atlasgo.io/guides/ai-tools): Agent skills and AI rules for using Atlas with coding agents. - [Guides](https://atlasgo.io/guides): Per-database and per-ORM guides, CI/CD platforms, and testing. ## Atlas Cloud - [Cloud getting started](https://atlasgo.io/cloud/getting-started): Sign up, atlas login, and the schema registry. - [Deployments](https://atlasgo.io/cloud/deployment): Deploy migrations from the registry to your environments. - [Audit log](https://atlasgo.io/cloud/auditlog): Track schema changes and deployments across environments. - [Pricing](https://atlasgo.io/pricing): Plans and pricing for Atlas Pro and Enterprise. ## Reference - [CLI reference](https://atlasgo.io/cli-reference): Every Atlas command and flag. - [Feature availability](https://atlasgo.io/features): Which features are included and which require Atlas Pro. - [Atlas vs others](https://atlasgo.io/atlas-vs-others): How Atlas compares to other schema migration tools. - [Trust center](https://atlasgo.io/trust): SOC 2, legal documents, and service availability.