Disable Policy checks
Disabling a Policy Check may be necessary when you have a check that is designed to detect specific scenarios that do not require constant monitoring for that particular pattern. This is done by using the checks disable command.
Procedure
In the CLI, Run the liquibase checks show command to display the short name.
liquibase checks show
To disable a check, you need to know the short name, which you can retrieve by running the checks show command.
Note: The show
command lists information and customization settings for available checks, including the check’s full name, short name, description, enabled status, and customization options.
Once the show list appears in the CLI, look for the short name for the check you're looking for.
In this example we are looking for the DROP TABLE
check, which is ChangeDropTableWarn
.
Disable the check with the --check-name parameter that includes the short name found in step 2
liquibase checks disable --check-name=ChangeDropTableWarn
Liquibase retains the configuration change to your checks configuration file, the default of which is liquibase.checks-settings.conf
. This means that you don't have to disable this check everytime you utilize Liquibase.
Execute the liquibase checks run command
Execute the liquibase checks run
command to ensure the ChangeDropTableWarn
check is disabled successfully. If it is disabled, no issues will be detected as shown in the output below.