Skip to content

979 - Migration Plan

Database migration plan across environments. This is an example of a MAML document.

maml
{
  schema_version: "1.3.4"
  database: "mysql"

  migrations: [
    {
      id: "1774575902"
      name: "alter_status_column"
      applied: true
    }

    {
      id: "1774662302"
      name: "create_updatedAt_index"
      applied: true
    }

    {
      id: "1774748702"
      name: "create_status_column"
      applied: true
    }

    {
      id: "1774835102"
      name: "alter_id_index"
      applied: false
    }

    {
      id: "1774921502"
      name: "add_updatedAt_index"
      applied: false
    }
  ]

  environments: {
    dev: {
      host: "dev-db.untried-plumber.com"
      port: 5432
      ssl: false
    }

    staging: {
      host: "staging-db.unsightly-charm.biz"
      port: 5432
      ssl: true
    }

    prod: {
      host: "prod-db.exotic-goodwill.com"
      port: 5432
      ssl: true
    }
  }
}

See Also