TableCommentCheck

The TableCommentCheck check allows you to flag any table that does not have a comment. Note that this is not a check for a Liquibase changelog comment.

Note: Checks require specific parameters noted in the table. Customizations to checks configuration are stored in the liquibase.checks-settings file.

Uses

You can use the check to check for the presence of a comment within a table described in a changelog. Comments explain the purpose of a table for anyone viewing the table.

Run the TableCommentCheck check

To run the TableCommentCheck check, ensure you have a Liquibase Labs license, a valid URL property, a URL property pointing to a live JDBC connection or a snapshot, and the checks-scope property includes database. The checks-scope parameter is set in the default properties file, environment variable, or any standard method. Then check the table for comments. Enable the TableCommentCheck check by running the following command in the CLI:

liquibase checks enable --check-name=TableCommentCheck

TableCommentCheck configurable attributes

Attribute Name Type Description Customization Default Value
SEVERITY String/enum

Set the severity to return a code of 0–4 when the check is triggered.

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

'INFO' | 0