DetectChangeType

This check warns a user when a changeset includes a Change Type listed by the user as forbidden.

Uses

Use the check to enhance deployment control of specific changesets by warning you if a forbidden Change Type is present. This way changesets do not violate policy by dropping tables or columns. 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 DetectChangeType check

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

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

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

true

Default value: 0

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

<None>

This check warns a user when a changeset includes a Change Type listed by the user as forbidden.