Skip to main content

Database CI/CD with Atlas

CI/CD (Continuous Integration / Continuous Deployment) automates the process of validating and deploying schema changes. Instead of manually reviewing SQL and running migrations by hand, Atlas integrates into your existing CI/CD pipeline. The workflow has four stages:

Database CI/CD workflow with Atlas: Develop, Review, Deliver, Deploy.
  1. Develop: Create a branch, edit your schema, generate a migration plan.
  2. Review: Open a pull request. Atlas runs CI to simulate and validate the change, run any tests, and enforce any custom rules set by your team. A lint report with 50+ built-in checks is posted as a PR comment.
  3. Deliver: After merge, push the approved version to the Atlas Registry.
  4. Deploy: Apply the change to your target databases.

For a deeper understanding of the principles behind this workflow, see the Modern Database CI/CD guide.

Prerequisites​

  • An Atlas Pro account (atlas login)
  • A bot token from Atlas Cloud, stored as a CI secret (e.g. ATLAS_CLOUD_TOKEN)

Get Started with CI/CD for Schema Changes​

Atlas provides full CI/CD setup guides for both workflows. Pick yours:

CI/CD for Declarative Migrations

Generate schema plans on PRs, approve and push on merge, and apply changes using pre-approved plans.

Supported CI Platforms​

Atlas verifies your schema changes by running them against various checks to ensure their safety and validity. Verify these changes locally, or as part of your CI process.

Deploying Migrations​

Deploy migrations to target databases in production by integrating natively with your infrastructure management.

Next Steps​