Skip to content

invalid-foreign-key-name (NM004)#

Automatic fix is not available.

What it does#

Checks that the name of the foreign key constraint to be created is valid according to naming convention.

Why not?#

Naming conventions are crucial in database design as they offer consistency, clarity, and structure to the organization and accessibility of data within a database.

A good naming convention makes your code easier to read and understand.

When should you?#

Never.

Use instead:#

Name your foreign key constraint according to the set name convention.

Configuration#

regex-constraint-foreign-key: Regex matching the naming convention for foreign key constraints.