YAML changelog example

Last updated: November 18, 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
loading

You can add YAML comments outside changesets using the format # my comment.