ChangesetCommentCheck

This check enforces the Liquibase best-practice recommendation to assign comments to every changeset to document the purpose of a changeset for other/future consumers of this changelog.

Uses

Use the check to warn when a changeset comment has not been added to a changeset. Modern database and application teams consist of multiple developers, DBAs, data architects and more, often remote and dispersed around the world. It is a good idea, therefore, to add a comment to database changes to document the purpose of a changeset for fellow and future users of this changelog. This quality 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 ChangesetCommentCheck check

The ChangesetCommentCheck 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 ChangesetCommentCheck 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 ChangesetCommentCheck is enabled.

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

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

true

Default value: 0

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

<None>

This check enforces the Liquibase recommendation that comments be added to each changeset to document the purpose of a changeset for other/future consumers of this changelog.