You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Check that IF a context is provided, the context value must match a specified pattern.
Different than UserDefinedContextCheck because context is NOT REQUIRED in this check.
This check uses Check Chaining which requires Liquibase Pro 4.27.0+.
Sample Passing Changesets
--changeset ASmith:table01 context:PRODcreatetabletable01 (
id numericnot null,
name varchar (255)
);
--changeset ASmith:table01 context:!PRODcreatetabletable01 (
id numericnot null,
name varchar (255)
);
--changeset ASmith:table01createtabletable01 (
id numericnot null,
name varchar (255)
);
Sample Failing Changeset
--changeset ASmith:table01 context:INVALID_ENVIRONMENTcreatetabletable01 (
id numericnot null,
name varchar (255)
);
Sample Error Message
DATABASE CHECKS
----------------
Checks completed validation of the changelog and found the following issues:
Check Name: Chained checks template (EnumerationListContext)
Changeset ID: table01
Changeset Filepath: changelogs/changelog.sql
Check Severity: MAJOR (Return code: 2)
Message: If context is provided, value must be DEV, UAT, or PROD.
Give your check a short name for easier identification (up to 64 alpha-numeric characters only) [ChainedChecksTemplate1]:
EnumerationListContext
Set the Severity to return a code of 0-4 when triggered. (options: 'INFO'=0, 'MINOR'=1, 'MAJOR'=2, 'CRITICAL'=3, 'BLOCKER'=4)? [INFO]:
<Choose a value: 0, 1, 2, 3, 4>
Enter the shortname, logic conditional (using &&, ||, !), and optional (groupings) for your checks. Example: "(shortname1 && shortname2) || shortname3":