ObjectNameMustMatch

The ObjectNameMustMatch check allows you to confirm the listed object names conform to the supplied pattern.

  • checks require specific parameters noted in the table.
  • Customizations to checks configuration are stored in the liquibase.checks-settings file.

Uses

Use the check to validate that object naming conventions adhered to and that object names match the supplied pattern. This ensures that you have direct control over their object names and avoid naming issues.


Run the ObjectNameMustMatch check

To run the ObjectNameMustMatch check, ensure you have a Liquibase Lab license, a valid URL property that points to a live JDBC connection or a snapshot, and the checks-scope property includes database. The checks-scope is set in the default properties file, environment variable, or any standard method. Then check if any searchable object types match the supplied pattern. Enable the ObjectNameMustMatch check by running the following command in the CLI: 

liquibase checks enable --check-name=ObjectNameMustMatch
Liquibase prompts you to establish a copy of this check and to initiate the customization work flow. To do this, select options for each of the attributes below in the CLI.

Note: This check can not be enabled directly because one or more fields does not have a default value. Creating a copy of this check initiates the customization work flow.

The check is active.

ObjectNameMustMatch configurable attributes

The following table identifies attributes that are configurable by ObjectNameMustMatch.

Attribute Name Type Description Options/ Validation Default Value
Operator

String/enum

The location to look for the provided SearchString Value

- startsWith - SearchString provided should be found at the beginning of the table.

- endsWith - SearchString provided should be found at the end of the table.

- contains - SearchString Provided can be anywhere in the table.

- regexp - SearchString provided is a regexp that should be matched.

contains
SearchString

String/enum

The substring or regular expression to match.

Validation - SearchString should be a valid regular expression.

 

Message

String/enum

The message you wish to print when the check detects a pattern match

 

A match for regular expression {{SearchString}} value was detected in Changeset changeset id.
Severity

String/enum

Set the severity of the check

'INFO' | 0,

'MINOR' | 1,

'MAJOR' | 2,

'CRITICAL' | 3,

'BLOCKER' | 4

INFO | 0
Constraint

String/enum

Enter the required constraint(s), separate NOT NULL, UNIQUE, PRIMARYKEY, FOREIGNKEY PRIMARYKEY
Case Sensitivity

String/enum

Set CASE_SENSITIVE (options: true, false) user entry of true or false is accepted case-insensitively false
Object_Type

String/enum

Select the object types to check TABLE, COLUMN, SEQUENCE, INDEX false