ModifyDataTypeWarn

This check warns a user when a change will result in modification of a data type so they can ensure this change will not lead to unintentional data loss.

Uses

Use the ModifyDataTypeWarn check to warn when changelogs contain a data type modification, such as a change which might lead to unintended changes or permanent loss of essential data. Unexpected changes can lead to failures of database or application jobs which rely on the previous datatype, in turn potentially leading to missing and unrecoverable data loss, service outages, and more. 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 inspect these changes.

Run the ModifyDataTypeWarn check

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

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

liquibase checks enable --check-name=ModifyDataTypeWarn
Short Name Scope Enabled Severity Customization Description
ModifyDataTypeWarn changelog, database

true

Default value: 0

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

<None>

This check warns a user when a change will result in modification of a data type so they can ensure that modifying the data type won't lead to unintentional loss of data.