Applying Schema Migrations
Learn how to use the `atlas migrate apply` command to apply versioned schema migrations to your database. This page covers the full workflow for managing, validating, and deploying database schema migrations with Atlas.
Learn how to use the `atlas migrate apply` command to apply versioned schema migrations to your database. This page covers the full workflow for managing, validating, and deploying database schema migrations with Atlas.
Learn how to automatically generate schema migrations for any database schema change using the `atlas migrate diff` command. This guide covers automatic migration planning for database schema migrations with Atlas, best practices, and examples for SQL, HCL, and ORM sources.
Learn how to integrate Atlas with GitLab CI/CD to automate and manage database schema migrations. This guide covers both versioned and declarative workflows, including schema linting, migration planning, approvals, and deployment across multiple databases.
Learn how to connect your migration directory to Atlas Cloud, enabling streamlined migration management, CI/CD integration, and Slack notifications.
This section introduces two types of workflows that are supported by Atlas
Learn how to deploy versioned migrations in Kubernetes using Atlas Schema Registry. This guide covers the prerequisites, steps, and best practices for managing migrations in a Kubernetes environment.
Learn how to revert applied schema migrations using the `atlas migrate down` command, computing rollback plans dynamically based on the current database state.
Learn how Atlas automatically generates SQL migration scripts from your desired schema. Plan, lint, and safely apply database schema changes.
Learn how to create manual migration files with `atlas migrate new` to handle custom DDL, seed data, or integrate unsupported schema changes.
Learn how to use migration directory checkpoints in Atlas to capture database schema snapshots, skip previously applied migrations, and speed up migration workflows.
Learn how to import existing migration directories from tools like Flyway or golang-migrate into the Atlas migration format using `atlas migrate import`.
Applying changes to a database schema in the wrong order can be dangerous. For this
Learn how to troubleshoot migration failures with Atlas, including inspecting migration status, setting migration versions, and resolving partial or failed schema changes.
Pre-migration checks allow you to run assertions on the target database before applying migrations, reducing the risk of migration failures.
Learn how to define and run pre-migration checks in Atlas to validate schema conditions before applying migrations, ensuring safe database changes.
Learn how to report schema migrations to Atlas Cloud, enabling streamlined deployment and management of migrations across environments.
Intro
Atlas helps you ensure safe schema migrations for your database by automatically analyzing migration files for potentially dangerous or breaking changes.
In our previous sqlc guide, we saw how we can use Atlas to handle the schema
Manage database schema migrations with Terraform using the Atlas Terraform Provider and versioned migration files.