customize

Note: This is a Liquibase Pro command, so you need a Liquibase Pro License Key to use it.
The customize
subcommand allows you to customize dynamic checks specified in your check configurations: --checks-settings-file
.
Uses
Using the customize
subcommand, you can provide your values or change the default values of checks that have customization options.
Examples include lists of data types, Change Types, strings, or regular expressions that should be reported, and others.
Liquibase does not allow you to customize static checks.
Note: To view a list of available checks, run liquibase checks show
.
Syntax
The command is interactive, and you need to follow the CLI output messages to run it:
- Run the command specifying your values:
- Enter the value you want to change.
liquibase checks customize --check-name=TableColumnLimit
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
. See Use the Checks Settings Configuration File.
The command updates the value of a check in the checks settings file. To run the check, use the run command.
Command arguments
The following table identifies parameters that are accepted or required by the customize
subcommand. If the Default column states "Required," it is required to run the command successfully. If it states "Null," it is an optional command argument. Each command argument helps you narrow down the liquibase checks customize
command to ensure that only very specific content is affected by the command.
Tip: For best results, specify all commands and parameters in the --kebab-case
format in the CLI. If your preference is camelCase, it also works in the CLI.
Name | Default | Syntax | Description |
---|---|---|---|
check-name
|
Required |
CLI: Property: Environment Variable: |
Use this to specify the short name of the check you want to target with one of the following subcommands:
|
checks-settings-file
|
Null |
CLI: Property: Environment Variable: |
Specifies the checks settings file to use with subcommands. Write the relative path of the settings file that you want to read from or modify. For more information, see Use the Checks Settings Configuration File. |
auto-update
|
Null |
CLI: Property: Environment Variable: |
Allows automatic backup and updating of the Default: off |

customize
example output
liquibase checks customize --check-name=TableColumnLimit
####################################################
## _ _ _ _ ##
## | | (_) (_) | ##
## | | _ __ _ _ _ _| |__ __ _ ___ ___ ##
## | | | |/ _` | | | | | '_ \ / _` / __|/ _ \ ##
## | |___| | (_| | |_| | | |_) | (_| \__ \ __/ ##
## \_____/_|\__, |\__,_|_|_.__/ \__,_|___/\___| ##
## | | ##
## |_| ##
## ##
## Get documentation at docs.liquibase.com ##
## Get certified courses at learn.liquibase.com ##
## ##
####################################################
Starting Liquibase at 15:19:09 (version 4.24.0 #14062 built at 2023-09-28 12:18+0000)Liquibase Version: 4.24.0Liquibase Pro 4.24.0 by Liquibase licensed to Liquibase until Tue Dec 31 21:59:59 MST 2024
WARNING: The file '/C:/Projects/liquibase/examples/sql/liquibase.checks-settings.conf' has been updated so it can be used by your current version of Liquibase, and to simplify resolving merge conflicts in Source Control. No action is required from you. Your original file was backed up as '/C:/Projects/liquibase/examples/sql/liquibase.checks-settings.conf.v4.23'.Set the Severity to return a code of 0-4 when triggered. (options: 'INFO'|0, 'MINOR'|1, 'MAJOR'|2, 'CRITICAL'|3, 'BLOCKER'|4)? [INFO]:
0
Set 'MAX_COLUMNS' (options: positive numeric value) [50]:
25
Customization complete. Review the table below to confirm your changes.
+---------------------------------+------------+---------+----------+--------------------------------+--------------------------------+
| Short Name | Scope | Enabled | Severity | Customization | Description
|
+---------------------------------+------------+---------+----------+--------------------------------+--------------------------------+
| SqlGrantWarn | changelog | true | 0 | None | This check warns a user when |
| | | | | | SQL contains 'GRANT' |
| | | | | | statements so that they can |
| | | | | | ensure that the privilege |
| | | | | | being granted won't lead to | | | | | | | security issues. |
+---------------------------------+------------+---------+----------+--------------------------------+--------------------------------+
| SqlRevokeWarn | changelog | true | 0 | None | This check warns a user when |
| | | | | | SQL contains 'REVOKE' |
| | | | | | statements so that they can |
| | | | | | ensure that the privilege |
| | | | | | being revoked won't lead to |
| | | | | | data access and dependency |
| | | | | | issues.|
+---------------------------------+------------+---------+----------+--------------------------------+--------------------------------+
| WarnOnUseDatabase | changelog | true | 0 | None | This check warns a user when |
| | | | | | generated or raw SQL contains |
| | | | | | 'USE DATABASE' directive. |
+---------------------------------+------------+---------+----------+--------------------------------+--------------------------------+
| ChangeDropTableWarn | changelog | true | 0 | None | This check warns a user when a |
| | | | | | table is being dropped so that |
| | | | | | they can ensure that dropping |
| | | | | | the table won't lead to |
| | | | | | unintentional loss of data. |
+---------------------------------+------------+---------+----------+--------------------------------+--------------------------------+
| ChangeDropColumnWarn | changelog | true | 0 | None | This check warns a user when a |
| | | | | | column is being dropped so |
| | | | | | that they can ensure that |
| | | | | | dropping the column won't lead |
| | | | | | to unintentional loss of data. |
+---------------------------------+------------+---------+----------+--------------------------------+--------------------------------+
| ModifyDataTypeWarn | changelog | true | 0 | 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 |
+---------------------------------+------------+---------+----------+--------------------------------+--------------------------------+
| SqlSelectStarWarn | changelog | true | 0 | None | This check warns a user when |
| | | | | | generated or raw SQL contains |
| | | | | | 'SELECT *' statements so that |
| | | | | | they can ensure selecting all |
| | | | | | fields from a table in a query |
| | | | | | is safe and necessary |
+---------------------------------+------------+---------+----------+--------------------------------+--------------------------------+
| SqlUserDefinedPatternCheck | changelog | false | 0 | SEARCH_STRING = null | This check scans SQL for the |
| | | | | MESSAGE = A match for regular | presence of specific patterns |
| | | | | expression SEARCH_STRING was | and warns the user when they |
| | | | | detected in Changeset | are found.
|
| | | | | CHANGESET. |
|
| | | | | STRIP_COMMENTS = true |
|
+---------------------------------+------------+---------+----------+--------------------------------+--------------------------------+
| TableColumnLimit | changelog, | true | 0 | MAX_COLUMNS = 25 | Ensures that no table has more |
| | database | | | | than a threshold number of |
| | | | | | columns.
|
+---------------------------------+------------+---------+----------+--------------------------------+--------------------------------+
| ObjectNameMustMatch | changelog, | false | 0 | OPERATOR = STARTS_WITH | This check confirms the listed |
| | database | | | SEARCH_STRING = null | object names conform to the |
| | | | | OBJECT_TYPES = null | supplied pattern. |
| | | | | CASE_SENSITIVE = true |
|
+---------------------------------+------------+---------+----------+--------------------------------+--------------------------------+
| ObjectNameMustNotMatch | changelog, | false | 0 | OPERATOR = STARTS_WITH | This check confirms the listed |
| | database | | | SEARCH_STRING = null | object names do not match the |
| | | | | OBJECT_TYPES = null | supplied pattern. |
| | | | | CASE_SENSITIVE = true |
|
+---------------------------------+------------+---------+----------+--------------------------------+--------------------------------+
| SqlGrantSpecificPrivsWarn | changelog | false | 0 | PRIVILEGE_LIST = null | This check warns a user when |
| | | | | | changeset includes or |
| | | | | | generates sql that grants |
| | | | | | specific privileges to a user |
| | | | | | or role
|
+---------------------------------+------------+---------+----------+--------------------------------+--------------------------------+
| ChangeTruncateTableWarn | changelog | true | 0 | None | This check warns a user when a |
| | | | | | table is being truncated so |
| | | | | | that they can ensure that |
| | | | | | truncating the table won't |
| | | | | | lead to unintentional loss of |
| | | | | | data.
|
+---------------------------------+------------+---------+----------+--------------------------------+--------------------------------+
| SqlGrantOptionWarn | changelog | true | 0 | None | This check warns a user when |
| | | | | | SQL contains 'GRANT' |
| | | | | | statements that include the |
| | | | | | 'WITH GRANT OPTION' clause so |
| | | | | | that they can ensure that the |
| | | | | | privilege being granted won't |
| | | | | | lead to security issues |
+---------------------------------+------------+---------+----------+--------------------------------+--------------------------------+
| OracleReservedKeywords | changelog, | false | 0 | OBJECT_TYPES = null | Disallow Oracle reserved |
| | database | | | ALLOWED_LIST = null | keywords from being used in |
| | | | | CASE_SENSITIVE = true | database object names. See |
| | | | | | https://docs.oracle.com/cd/B19 |
| | | | | | 306_01/em.102/b40103/app_oracl |
| | | | | | e_reserved_words.htm for |
| | | | | | complete list of keywords. |
+---------------------------------+------------+---------+----------+--------------------------------+--------------------------------+
| SQLServerReservedKeywords | changelog, | false | 0 | OBJECT_TYPES = null | Disallow SQL Server reserved |
| | database | | | ALLOWED_LIST = null | keywords from being used in |
| | | | | CASE_SENSITIVE = true | database object names. See |
| | | | | | https://docs.microsoft.com/en- |
| | | | | | us/sql/t-sql/language-elements |
| | | | | | /reserved-keywords-transact-sq |
| | | | | | l?view=sql-server-ver16 for |
| | | | | | complete list of keywords. |
+---------------------------------+------------+---------+----------+--------------------------------+--------------------------------+
| SQLServerFutureReservedKeywords | changelog, | false | 0 | OBJECT_TYPES = null | Disallow SQL Server's future |
| | database | | | ALLOWED_LIST = null | reserved keywords from being |
| | | | | CASE_SENSITIVE = true | used in database object names. |
| | | | | | See
|
| | | | | | https://docs.microsoft.com/en- |
| | | | | | us/sql/t-sql/language-elements |
| | | | | | /reserved-keywords-transact-sq |
| | | | | | l?view=sql-server-ver16 for |
| | | | | | complete list of keywords. |
+---------------------------------+------------+---------+----------+--------------------------------+--------------------------------+
| PostgresReservedKeywords | changelog, | false | 0 | OBJECT_TYPES = null | Disallow Postgres reserved |
| | database | | | ALLOWED_LIST = null | keywords from being used in |
| | | | | CASE_SENSITIVE = true | database object names. See |
| | | | | | https://www.postgresql.org/doc |
| | | | | | s/14/sql-keywords-appendix.htm |
| | | | | | l for complete list of |
| | | | | | keywords.
|
+---------------------------------+------------+---------+----------+--------------------------------+--------------------------------+
| SQLServerODBCReservedKeywords | changelog, | false | 0 | OBJECT_TYPES = null | Disallow SQL Server's ODBC |
| | database | | | ALLOWED_LIST = null | reserved keywords from being |
| | | | | CASE_SENSITIVE = true | used in database object names. |
| | | | | | See
|
| | | | | | https://docs.microsoft.com/en- |
| | | | | | us/sql/t-sql/language-elements |
| | | | | | /reserved-keywords-transact-sq |
| | | | | | l?view=sql-server-ver16 for |
| | | | | | complete list of keywords. |
+---------------------------------+------------+---------+----------+--------------------------------+--------------------------------+
| PostgresNonReservedKeywords | changelog, | false | 0 | OBJECT_TYPES = null | Disallow Postgres non-reserved |
| | database | | | ALLOWED_LIST = null | keywords from being used in |
| | | | | CASE_SENSITIVE = true | database object names. See |
| | | | | | https://www.postgresql.org/doc |
| | | | | | s/14/sql-keywords-appendix.htm |
| | | | | | l for complete list of |
| | | | | | keywords.
|
+---------------------------------+------------+---------+----------+--------------------------------+--------------------------------+
| SqlGrantAdminWarn | changelog | true | 0 | None | This check warns a user when |
| | | | | | SQL contains 'GRANT' |
| | | | | | statements that include the |
| | | | | | 'WITH ADMIN OPTION' clause so |
| | | | | | that they can ensure that the |
| | | | | | privilege being granted won't |
| | | | | | lead to security issues |
+---------------------------------+------------+---------+----------+--------------------------------+--------------------------------+
| DetectChangeType | changelog | true | 0 | CHANGE_TYPE_LIST = | This check warns a user when a |
| | | | | dropTable,dropColumn | ChangeSet includes a |
| | | | | | ChangeType listed by the user |
| | | | | | as forbidden
|
+---------------------------------+------------+---------+----------+--------------------------------+--------------------------------+
| RollbackRequired | changelog | true | 0 | None | This check triggers when a |
| | | | | | changeset does not have a |
| | | | | | rollback defined. |
+---------------------------------+------------+---------+----------+--------------------------------+--------------------------------+
| ChangesetLabelCheck | changelog | true | 0 | None | This check enforces the |
| | | | | | Liquibase recommendation that |
| | | | | | labels be assigned to each |
| | | | | | changeset to provide better |
| | | | | | deployment control and to |
| | | | | | enhance traceability of |
| | | | | | efforts across changesets. |
+---------------------------------+------------+---------+----------+--------------------------------+--------------------------------+
| ChangesetContextCheck | changelog | true | 0 | None | This check enforces the |
| | | | | | Liquibase recommendation that |
| | | | | | contexts be assigned to each |
| | | | | | changeset to provide better |
| | | | | | deployment control and to |
| | | | | | enhance traceability of |
| | | | | | efforts across changesets. |
+---------------------------------+------------+---------+----------+--------------------------------+--------------------------------+
| ChangesetCommentCheck | changelog | true | 0 | None | This check enforces the |
| | | | | | Liquibase recommendation that |
| | | | | | comments be added to each |
| | | | | | changeset to document the |
| | | | | | purpose of a changeset for |
| | | | | | other/future consumers of this |
| | | | | | changelog
|
+---------------------------------+------------+---------+----------+--------------------------------+--------------------------------+
| OneChangePerChangeset | changelog | true | 0 | None | This check enforces the |
| | | | | | Liquibase Best Practice of |
| | | | | | keeping individual changesets |
| | | | | | small by limiting them to one |
| | | | | | statement or change. |
+---------------------------------+------------+---------+----------+--------------------------------+--------------------------------+
| PrimaryKeyOnCreateTable | changelog | true | 0 | EXCEPTIONS_LIST = | This check warns when a create |
| | | | | CASE_SENSITIVE = true | table action doesn't also |
| | | | | | include a primary key. |
+---------------------------------+------------+---------+----------+--------------------------------+--------------------------------+
| CheckTablesForIndex | database | true | 0 | None | This check scans your target |
| | | | | | URL database tables to find |
| | | | | | tables which do not have an |
| | | | | | associated index. |
+---------------------------------+------------+---------+----------+--------------------------------+--------------------------------+
| TableCommentCheck | database | false | 0 | None | This database check flags any |
| | | | | | table which does not have a |
| | | | | | comment. (Note: This is not a |
| | | | | | check for a Liquibase |
| | | | | | changelog comment.) |
+---------------------------------+------------+---------+----------+--------------------------------+--------------------------------+
| TableCommentPatternCheck | changelog, | false | 0 | OPERATOR = CONTAINS | This check triggers when |
| | database | | | SEARCH_STRING = null | specific user-supplied |
| | | | | MESSAGE = A match for regular | patterns are found in Table |
| | | | | expression SEARCH_STRING was | Comments.
|
| | | | | detected in IDENTIFIER. |
|
+---------------------------------+------------+---------+----------+--------------------------------+--------------------------------+
| ConstraintMustExist | database | false | 0 | CONSTRAINT_OPERATOR = | Check for and alert when |
| | | | | STARTS_WITH | specified table does not |
| | | | | TABLE_NAME = null | contain the required |
| | | | | COLUMN_NAME = null | constraint(s). |
| | | | | CONSTRAINT = PRIMARYKEY |
|
| | | | | CASE_SENSITIVE = true |
|
| | | | | MESSAGE = The specified table |
|
| | | | | 'TABLE_NAME' does not |
|
| | | | | contain the required |
|
| | | | | 'CONSTRAINT' constraint. |
|
+---------------------------------+------------+---------+----------+--------------------------------+--------------------------------+
| RequireChangesetIDisUUID | changelog | false | 0 | None | Alerts when a changeset ID |
| | | | | | does not follow the 8-4-4-4-12 |
| | | | | | pattern of UUID or GUID. |
+---------------------------------+------------+---------+----------+--------------------------------+--------------------------------+
Liquibase command 'checks customize' was executed successfully.