Sharing some naming conventions is a key factory in efficient team collaboration. This rule checks that all constraint names match a provided regular expression.


== Noncompliant Code Example

With ``++format_primary_key++`` set to "pk_[a-z]{plus}{plus} " and ``++format_foreign_key++`` to "fk_[a-z]{plus}{plus} ".

----
CREATE TABLE employee(
  first_name VARCHAR2(42),
  last_name VARCHAR2(42)
  department_id INTEGER CONSTRAINT department_fk REFERENCES department,
  CONSTRAINT fullname_pk PRIMARY KEY (first_name, last_name);
);
----


== Compliant Solution

----
CREATE TABLE employee(
  first_name VARCHAR2(42),
  last_name VARCHAR2(42)
  department_id INTEGER CONSTRAINT fk_department REFERENCES department,
  CONSTRAINT pk_fullname PRIMARY KEY (first_name, last_name);
);
----

