Automatic Migration Planning
The atlas migrate diff
command streamlines the process of writing schema migrations by automatically generating the
SQL scripts needed to migrate a database schema from its current state to the new desired state. How does it work?
Developers define the desired state and Atlas maintains the migrations
directory, which contains the explicit SQL
migration scripts to move from one version to the next. The desired state can be defined using an HCL or
SQL schema definition, a database URL, or an external schemas like ORM.