delete
The delete
subcommand allows you to delete a copy of a dynamic check from the checks configuration in the checks settings file.
Uses
You can typically use the delete
command to remove checks you have made in error or checks you no longer need to keep your checks configuration concise and maintainable.
You cannot delete static checks and parent dynamic checks used to create copies of checks.
Note: To view a list of available checks, run liquibase checks show
.
Running the delete
command
The command is interactive, and you need to follow the CLI output messages to execute it:
-
Run the command specifying your values:
liquibase checks delete --check-name=TableColumnLimit1
Note: If you have a checks settings file customized for a specific environment or project, you need to pass that using the
--checks-settings-file
parameter. If you do not include this parameter, Liquibase uses the default settings file:liquibase.checks-settings.conf
. - Confirm that you want to do the change.
The command will update the checks settings file.
delete
command attributes
Name | Syntax | Description |
---|---|---|
checks-settings-file
|
CLI:
Property:
Environment Variable:
|
The parameter which specifies the needed checks settings file to work with subcommands. Set the For more information, see Using the Checks Settings Configuration File. |
check-name
|
CLI:
Property:
Environment Variable:
|
The parameter which you must specify so that any of the following subcommands being executed can perform its function:
Set the |
auto-update
|
CLI: Property: Environment Variable: |
The parameter which allows automatic backup and updating of the Default: off |

delete
example output
####################################################
## _ _ _ _ ##
## | | (_) (_) | ##
## | | _ __ _ _ _ _| |__ __ _ ___ ___ ##
## | | | |/ _` | | | | | '_ \ / _` / __|/ _ \ ##
## | |___| | (_| | |_| | | |_) | (_| \__ \ __/ ##
## \_____/_|\__, |\__,_|_|_.__/ \__,_|___/\___| ##
## | | ##
## |_| ##
## ##
## Get documentation at docs.liquibase.com ##
## Get certified courses at learn.liquibase.com ##
## Free schema change activity reports at ##
## https://hub.liquibase.com ##
## ##
####################################################
Starting Liquibase at 09:34:54 (version 4.5.0-DAT-6000-SNAPSHOT #74 built at 2021-09-20 19:47+0000)
Liquibase Version: 4.5.0-DAT-6000-SNAPSHOT
Liquibase Pro 4.5.0-DAT-6000-SNAPSHOT by Datical licensed to Liquibase Pro Customer until Tue Oct 26 19:00:00 CDT 2021
Deleting check with short name TableColumnLimit1
Current Customization Settings
Parameter name = MAX_COLUMNS
20
Are you sure you want to delete TableColumnLimit1 ? (Y/N) [N]:
Y
Check TableColumnLimit1 deleted
Review the table below to confirm your changes.
+-----+--------------------------------+----------------------------+--------------------------------+---------+--------------------------------+
| # | Check Name | Short Name | Description | Enabled | Customization |
+-----+--------------------------------+----------------------------+--------------------------------+---------+--------------------------------+
| 10 | Warn on Detection of 'GRANT' | SqlGrantWarn | This check warns a user when | true | <None> |
| | Statements | | generated or raw SQL contains | | |
| | | | 'GRANT' statements so that | | |
| | | | they can ensure that the | | |
| | | | privilege being granted won't | | |
| | | | lead to security issues. | | |
+-----+--------------------------------+----------------------------+--------------------------------+---------+--------------------------------+
| 20 | Warn on Detection of 'REVOKE' | SqlRevokeWarn | This check warns a user when | true | <None> |
| | Statements | | generated or raw SQL contains | | |
| | | | 'REVOKE' statements so that | | |
| | | | they can ensure that the | | |
| | | | privilege being revoked won't | | |
| | | | lead to data access and | | |
| | | | dependency issues. | | |
+-----+--------------------------------+----------------------------+--------------------------------+---------+--------------------------------+
| 30 | Warn when 'DROP TABLE' | ChangeDropTableWarn | This check warns a user when a | true | <None> |
| | detected | | table is being dropped so that | | |
| | | | they can ensure that dropping | | |
| | | | the table won't lead to | | |
| | | | unintentional loss of data. | | |
+-----+--------------------------------+----------------------------+--------------------------------+---------+--------------------------------+
| 40 | Warn when 'DROP COLUMN' | ChangeDropColumnWarn | This check warns a user when a | true | <None> |
| | detected | | column is being dropped so | | |
| | | | that they can ensure that | | |
| | | | dropping the column won't lead | | |
| | | | to unintentional loss of data. | | |
+-----+--------------------------------+----------------------------+--------------------------------+---------+--------------------------------+
| 50 | Warn when 'MODIFY <column>' | ModifyDataTypeWarn | This check warns a user when a | true | <None> |
| | detected | | 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 | | |
+-----+--------------------------------+----------------------------+--------------------------------+---------+--------------------------------+
| 60 | Check for specific patterns in | SqlUserDefinedPatternCheck | This check scans raw SQL for | false | SEARCH_STRING = null |
| | sql | | the presence of specific | | MESSAGE = A match for regular |
| | | | patterns and warns the user | | expression <SEARCH_STRING> was |
| | | | when they are found. | | detected in Changeset |
| | | | | | <CHANGESET>. |
+-----+--------------------------------+----------------------------+--------------------------------+---------+--------------------------------+
| 70 | Check Table Column Count | TableColumnLimit | Ensures that no table has more | true | MAX_COLUMNS = 25 |
| | | | than a threshold number of | | |
| | | | columns. | | |
+-----+--------------------------------+----------------------------+--------------------------------+---------+--------------------------------+
| 170 | Changesets Must Have a Label | ChangesetLabelCheck | This check enforces the | true | <None> |
| | Assigned | | Liquibase recommendation that | | |
| | | | labels be assigned to each | | |
| | | | changeset to provide better | | |
| | | | deployment control and to | | |
| | | | enhance traceability of | | |
| | | | efforts across changesets. | | |
+-----+--------------------------------+----------------------------+--------------------------------+---------+--------------------------------+
| 173 | Changesets Must Have a Context | ChangesetContextCheck | This check enforces the | true | <None> |
| | Assigned | | Liquibase recommendation that | | |
| | | | contexts be assigned to each | | |
| | | | changeset to provide better | | |
| | | | deployment control and to | | |
| | | | enhance traceability of | | |
| | | | efforts across changesets. | | |
+-----+--------------------------------+----------------------------+--------------------------------+---------+--------------------------------+
| 176 | Changesets Must Have a Comment | ChangesetCommentCheck | This check enforces the | true | <None> |
| | Assigned | | Liquibase recommendation that | | |
| | | | comments be added to each | | |
| | | | changeset to document the | | |
| | | | purpose of a changeset for | | |
| | | | other/future consumers of this | | |
| | | | changelog | | |
+-----+--------------------------------+----------------------------+--------------------------------+---------+--------------------------------+
Liquibase command 'delete' was executed successfully.