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
}

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

Constraints

ConstraintValue
Requiredtrue
Require Nametrue
Allow Qualifierfalse
Repeatablefalse
Allow unknown blocksfalse
Allow unknown attributesfalse