Database Policy Checks

Database policy checks allow you to confirm the presence of specific objects and conditions in the database to ensure the integrity of the database.

To execute these policy checks, ensure that --checks-scope contains database.

For more information about using policy checks, see Policy Checks. For a list of all checks, see Library of Policy Checks.

Database Checks

Short Name Scope (--checks-scope value) Description Enabled by Default Liquibase version required
ChainedChecksTemplate changelog or database     4.27.0+
ObjectNameMustMatch changelog or database The ObjectNameMustMatch check allows you to confirm the listed object names conform to the supplied pattern. false 4.6.2+
ObjectNameMustNotMatch changelog or database The ObjectNameMustNotMatch check allows you to confirm the listed object names conform to the supplied pattern and locate the object names that do not match so they can be corrected. false 4.6.2+
OracleReservedKeywords changelog or database This check can be used to prevent Oracle's reserved keywords from being used in database object names. false 4.12.0+
PostgresNonReservedKeywords changelog or database This check disallows Postgres non-reserved keywords from being used in database object names. See the SQL Key Words Appenix for complete list of keywords. false 4.12.0+
PostgresReservedKeywords changelog or database This check disallows Postgres reserved keywords from being used in database object names. See the SQL Key Words Appendix for complete list of keywords. false 4.12.0+
SQLServerFutureReservedKeywords changelog or database This check disallows SQL Server's future reserved keywords from being used in database object names. See Reserved Keywords (Transact-SQL) for complete list of keywords. false 4.12.0+
SQLServerODBCReservedKeywords changelog or database This check disallows SQL Server's ODBC reserved keywords from being used in database object names. See Reserved Keywords (Transact-SQL) for complete list of keywords. false 4.12.0+
SQLServerReservedKeywords changelog or database This check disallows SQL Server reserved keywords from being used in database object names. See Reserved Keywords (Transact-SQL) for complete list of keywords. false 4.12.0+
TableColumnLimit changelog or database The TableColumnLimit check allows you to ensure that no table described in a changelog or existing in a database target has more than a threshold number of columns. true 4.5.0+
TableCommentCheck changelog or database The TableCommentCheck check allows you to flag any table that does not have a comment. Note that this is not a check for a Liquibase changelog comment. false 4.12.0+
TableCommentPatternCheck changelog or database The TableCommentPatternCheck check triggers when specific user-supplied patterns are present in table comments. false 4.12.0+
CheckTablesForIndex database This check scans your target URL database tables to find tables which do not have an associated index. true 4.19.0+
ConstraintMustExist database The ConstraintMustExist check allows you to specify an individual table or column by name to check that it has one or more specific constraints. false 4.12.0+