OneChangePerChangeset

This check enforces the Liquibase best-practice of keeping individual changesets small by limiting them to one statement or change.

Uses

Use the check to enhance deployment control of changesets by limiting a changeset to a single change. Whether in automation or manual testing of proposed schema changes at the dev level, simple changesets provide better deployment control. This policy check, like other checks, can be configured with a severity level which returns an exit code designed to stop automated jobs, giving your team time to apply this Liquibase best practice.

Run the OneChangePerChangeset check

The OneChangePerChangeset check is enabled by default, so you will not need to turn it on if you have not changed your settings previously. To run the OneChangePerChangeset check, ensure you have a Liquibase Pro license and the checks-scope property includes changelog. The checks-scope parameter is set in the default properties file, environment variable, or any standard method. Then, check the changelog to see if ChangesetLabelCheck is enabled.

Enable the OneChangePerChangeset check by running the following command in the CLI:

liquibase checks enable --check-name=OneChangePerChangeset
Short Name Scope Enabled Severity Customization Description
OneChangePerChangeset changelog

true

Default value: 0

  • 'INFO' | 0
  • 'MINOR' | 1
  • 'MAJOR' | 2
  • 'CRITICAL' | 3
  • 'BLOCKER' | 4

<None>

This check enforces the Liquibase best-practice of keeping individual changesets small by limiting them to one statement or change.