Agents change your database dozens of times a day. Atlas lints, tests, and enforces policy on every one.
AI agents ship code that changes your database. When an app deploy goes wrong, you roll back in minutes. When a database change goes wrong, there is no easy undo.
Validation, testing, and policy enforcement for every database change.
1# Atlas Schema Migrations2
3## Standard Workflow4
51. `atlas schema inspect --env <name>` - understand current state62. Edit schema source files (HCL, SQL, or ORM)73. `atlas schema validate --env <name>` - check syntax84. `atlas migrate diff --env <name>` - generate migration95. `atlas migrate lint --env <name> --latest 1` - validate106. `atlas migrate test --env <name>` - run tests11
12## Key Rules13
14- Never author migration SQL by hand15- Always use `--env` to reference `atlas.hcl` configs16- Never hardcode credentials - use `getenv()`17- Always lint before applying migrations18- Never ignore lint errors - fix or get approvalAgents edit schema code. Atlas generates the migration, validates it, and runs policy checks. You review intent and outcomes - not raw SQL.
Define rules for security, migrations, and permissions in code. Atlas enforces them on every change - whether authored by a human or an AI agent.
Validation and linting confirm schema code compiles and follows policy, like tsc, go build, or eslint for your database.
Testing verifies intent. Agents write unit tests that confirm the change does what it was meant to do - not just that it compiles.
Every PR with a schema change runs through the same pipeline - lint, test, policy check. Failed? The agent gets structured errors and self-corrects. No human in the loop.
Dropping column "legacy_id" violates data retention policy. Error returned to agent for self-correction.
Get started in minutes. Works with any database, any agent, any CI.