ChangesetCommentCheck

Last updated: July 14, 2025

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

Liquibase version required

4.5.0+

Scope (--checks-scope)

changelog

Default status

enabled

Default severity (exit code)

0 ("INFO")

Customizable settings

No (static)

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 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.

Before you begin

  1. Ensure that you have correctly specified your Liquibase Pro license key.

  2. Ensure that the --checks-scope parameter includes the scope of this check.

Changelog checks prerequisites

--license-key=<string>
--checks-scope=<string>

Procedure

1

Enable

This check is enabled by default. To verify that it is currently enabled, run the checks show command:

liquibase checks show --check-name=<string>

2

To run the check, use the checks run command.

liquibase checks run --check-name=<string>

Note: For flow files you'll need to run liquibase flow to apply your changes.