Skip to main content

Atlas Migration Plan

plan

The plan block defines a schema migration for a transition between two schema states.

plan "20240806145620" {
# Hashes generated by the 'atlas schema plan new' command.
from = "SMKH4vp9zdHDtpr9NrB4Li3n8x0meA3QrnRdJZuDQDM="
to = "oCvOMG7NOE+XUz04UA674zNYVdrN3qoFkJDZPKLPGA0="
# Actual migratio.
migration = <<-SQL
-- Migration content goes here.
SQL
}

plan attributes

Name and descriptionRequiredValue

from

Hash of the current schema state computed by Atlas

truestring

migration

The actual migration statements. For example:

migration = <<-SQL
-- Migration content goes here.
SQL
truestring

to

Hash of the desired schema state computed by Atlas

truestring

plan constraints

ConstraintValue
Requiredtrue
Require Name (e.g., plan "name" )true