CRQLabelRequired

Last updated: January 30, 2026

CRQLabelRequired is a custom policy check that tells Liquibase all changesets must have a CRQ (change request) label assigned.

regex: (?i:crq\d+)

Note: These steps describe how to create the custom policy check. It does not exist by default in Liquibase Secure.

Before you begin

Scope

Database

database

Relational

Before you begin

Procedure

These steps describe how to create the Custom Policy Check. It does not exist by default in Liquibase Secure.

1

Provide Liquibase with a label value by entering this into the CLI:

liquibase checks copy --check-name=UserDefinedLabelCheck
2

Give your check a short name for easy identification

Use up to 64 alpha-numeric characters only.

In this example we will use:
ContextEnvironmentsDevUatProd
3

Set the Severity to return a code of 0-4 when triggered.

These severity codes allow you to determine if the job moves forward or stops when this check triggers. Learn more here: Use Policy Checks in Automation: Severity and Exit Code options: 'INFO'=0, 'MINOR'=1, 'MAJOR'=2, 'CRITICAL'=3, 'BLOCKER'=4

4

Set the OPERATOR to the REGEXP option.

These are the options for this step: STARTS_WITH, ENDS_WITH, CONTAINS, REGEXP, EQUALS) [STARTS_WITH].

In this example, since we are creating a regex check, we will set the operator to REGEXP.

5

Set the SEARCH_STRING (options: a string, or a valid regular expression)

Regular expression
(?i:crq\d+)

Sample Passing Changeset

--changeset user.name:films_01 labels:CRQ123456 create table films_01 (   id int,    name varchar(30) );

Sample Failing Changeset

--changeset user.name:films_01 labels:v.1.0.1 create table films_01 (   id int,    name varchar(30) );

Sample Error Message

CHANGELOG CHECKS ---------------- Checks completed validation of the changelog and found the following issues: Check Name:         Check for User Defined Label (CRQLabelRequired) Changeset ID:       table_missing_crq Changeset Filepath: changelogs/ddl/missing_crq.sql Check Severity:     INFO (Return code: 4) Message:            Changeset label: '' did not match the pattern: matches the regular expression '(?i:crq\d+)'. Please review this label.