List of Quality Checks

Liquibase provides a default set of checks with default settings defined in the checks settings file. Liquibase Pro users can run unlimited enabled checks.

Quality checks are either static or dynamic. A dynamic check can have multiple configurations, whereas a static check can have only one.

  • A check is static if the attributes of the check cannot be customized. You cannot copy, customize, or delete static checks.
  • A check is dynamic if there are settings you can customize. Dynamic checks allow you to
    • You can copy, customize, and reset dynamic checks.
    • You cannot delete dynamic checks.
    • You can copy, customize, or delete the copy of a dynamic check.
    • You can also reset a copy to the parent check’s default settings.
  • All checks can be enabled or disabled.

Quality Check Scope

The scope of each check can be changelogs, databases, or both. This means that individual checks can deliver more insight into your changelogs and/or databases depending on the check. This is specified on each check listed below and on their corresponding page. Learn more at the following links:

Note: It is important to note that Quality Checks for Databases are only compatible with Relational databases verified as Advanced. Learn more about Database Verification Levels here: Database Verification and Support

Scope Definition
changelog These checks examine the working changelog where it looks for specific patterns (e.g. presence of undesirable changes such as GRANT)
database, changelog These checks examine both the database and the changelog (e.g. maximum number of columns in a table which could be in a new change or an existing table)
database These checks examine the target database for specific structures / patterns (e.g. presence of constraints on a table)

List of changelog scope checks

Short Name Description Enabled by Default
ChangeDropColumnWarn This check warns a user when a column is being dropped so that they can ensure that such a schema change won't lead to unintentional loss of data and unrecoverable data loss. true
ChangeDropTableWarn 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 data loss. true
ChangesetCommentCheck This check enforces the Liquibase best-practice recommendation to assign comments to every changeset to document the purpose of a changeset for other/future consumers of this changelog. true
ChangesetContextCheck This check enforces the Liquibase best-practice recommendation to assign a context to every changeset to provide better deployment control and to enhance traceability and granularity of deployments across changesets. true
ChangesetLabelCheck This check enforces the Liquibase best-practice recommendationto assign labels to every changeset to provide better deployment control and to enhance traceability and granularity of deployments across changesets. true
ChangeTruncateTableWarn This check warns a user when a table is being truncated so that they can ensure this change will not lead to unintentional data loss. true
CheckTablesForIndex This check scans your target URL database tables to find tables which do not have an associated index. true
DetectChangeType

This changelog check warns a user when a changeset includes a Change Type listed by the user as forbidden.

Note: This check applies only to model-based changelogs such as XML, YAML, and JSON. It does not apply to SQL changelogs.

true
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. true
OneChangePerChangeset This check enforces the Liquibase Best Practice of keeping individual changesets small by limiting them to one statement or change. true
PatternAFollowedByPatternB

This check allows you to check for specific patterns in your changelog and then produce a logged record of changeset structure when certain conditions are met.

 
PatternANotFollowedByPatternB This check allows you to check for specific patterns in your changelog and then produce a logged record of changeset structure when certain conditions are met.  
PatternANotPrecededByPatternB This check allows you to check for specific patterns in your changelog and then produce a logged record of changeset structure when certain conditions are met.  
PatternAPrecededByPatternB

This check allows you to check for specific patterns in your changelog and then produce a logged record of changeset structure when certain conditions are met.

 
PrimaryKeyOnCreateTable This check warns when a create table action does not also include a primary key. true
RequireChangesetDisUUID This check alerts you when a changeset ID does not follow the 8-4-4-4-12 pattern of UUID or GUID. false
RollbackRequired This check enforces the Liquibase best-practice recommendation to include rollbacks to every changeset. true
SQLGrantAdminWarn This check warns a user when a 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 or violate compliance regulations. true
SQLGrantOptionWarn 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 or violate compliance regulations. true
SqlGrantSpecificPrivsWarn This check warns a user when a changeset includes or generates sql that grants specific privileges to a user or role. false
SqlGrantWarn This check warns a user when a SQL contains 'GRANT' statements so that they can ensure that the privilege being granted won't lead to security issues. true
SQLRevokeWarn This check warns a user when a SQL contains 'REVOKE' statements so that they can ensure that the privilege being revoked won't lead to data access and dependency issues. true
SqlSelectStarWarn 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. true
SqlUserDefinedPatternCheck This check scans SQL for the presence of specific patterns and warns the user when they are found. false
WarnOnUseDatabase This check warns a user when generated or raw SQL contains 'USE DATABASE' directive. true

List of changelog and database scope checks

Short Name Description Enabled by Default
ObjectNameMustMatch The ObjectNameMustMatch check allows you to confirm the listed object names conform to the supplied pattern. false
ObjectNameMustNotMatch 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
OracleReservedKeywords This check can be used to prevent Oracle's reserved keywords from being used in database object names. false
PostgresNonReservedKeywords 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
PostgresReservedKeywords 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
SQLServerFutureReservedKeywords 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
SQLServerODBCReservedKeywords 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
SQLServerReservedKeywords 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
TableColumnLimit 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
TableCommentCheck 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. true
TableCommentPatternCheck The TableCommentPatternCheck check triggers when specific user-supplied patterns are present in table comments. false

List of database scope checks

Short Name Description Enabled by Default
ConstraintMustExist 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

Related links