• Task
  • Version · 5.0
  • User guide

NoDeleteWithoutWhere

Last updated: August 7, 2026

Before you begin

Procedure

1

Run this command in the CLI:

liquibase checks customize --check-name=SqlUserDefinedPatternCheck
2

Give your check a short name for easy identification

In this example we will use:
NoDataDmlStatements
3

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

4

Set the SEARCH_STRING to this valid regular expression:

Regular expression search string
(?i)insert\s*into|delete\s*from|update\s*([^\s]+)\s*set
5

Set the MESSAGE to display when a match for the regular expression <SEARCH_STRING> is found in a Changeset.

In this example we will use:
DATA DML statements are not allowed.
6

Set STRIP_COMMENTS to true if you want to remove the comments from the output.

Results

Sample Passing Script

Sample Failing Scripts

Sample Error Message