New Webinar: Govern roles, shares, and data movement in Snowflake

Learn how to govern Snowflake roles, shares, and data movement without slowing delivery. Join our live webinar on controlling drift, permissions, and audit readiness.

YAML changelog example

Last updated: September 2, 2025

Liquibase supports YAML as a format for storing your Changelog files.

Requirements

To use YAML-based changelogs, you must include snakeyaml-<version>.jar in your classpath.

Liquibase ships with snakeyaml.jar already in the Internal>Lib folder, which is already in the default classpath.

Example

This example changelog contains changesets that:

  1. Create a new person table with columns id, firstname, lastname, and state

  2. Add a new username column to the person table

  3. Create a lookup table state using data from person

The example precondition requires the user making the deployment to be liquibase.

YAML changelog example
databaseChangeLog:
  - preConditions:
      - runningAs:
          username: liquibase
  - changeSet:
      id: 1
      author: your.name
      labels: example-label
      context: example-context
      comment: example-comment
      changes:
        - createTable:
            tableName: person
            columns:
              - column:
                  name: id
                  type: int
                  autoIncrement: true
                  constraints:
                    primaryKey: true
                    nullable: false
              - column:
                  name: name
                  type: varchar(50)
                  constraints:
                    nullable: false
              - column:
                  name: address1
                  type: varchar(50)
              - column:
                  name: address2
                  type: varchar(50)
              - column:
                  name: city
                  type: varchar(30)
  - changeSet:
      id: 2
      author: your.name
      labels: example-label
      context: example-context
      comment: example-comment
      changes:
        - createTable:
            tableName: company
            columns:
              - column:
                  name: id
                  type: int
                  autoIncrement: true
                  constraints:
                    primaryKey: true
                    nullable: false
              - column:
                  name: name
                  type: varchar(50)
                  constraints:
                    nullable: false
              - column:
                  name: address1
                  type: varchar(50)
              - column:
                  name: address2
                  type: varchar(50)
              - column:
                  name: city
                  type: varchar(30)
  - changeSet:
      id: 3
      author: other.dev
      labels: example-label
      context: example-context
      comment: example-comment
      changes:
        - addColumn:
            tableName: person
            columns:
              - column:
                  name: country
                  type: varchar(2)