You might already have a broad standard for object names - and be enforcing it with the object-name rule - but you might also want a more specific rule concerning how foreign key constraints are named.
This rule will fail if the given name for a new foreign key constraint does not match the configured regex.
Note that unlike some other constraint rules, the linter does not enforce a foreign key constraint being explicitly named, because unlike those other constraint rules, Liquibase itself actually requires you to name it.
pattern- (regex, as string) regular expression that the name of any added foreign key constraint must adhere to
dynamicValue- (string) Spring EL expression, with the
AddForeignKeyConstraintChangeinstance as its expression scope, that should resolve to a string, and can then be interpolated in the pattern with
To ensure that a pattern is matched, including the base table name:
To ensure that a pattern is matched, including both table names - unless it would make it too long: