NeonN
Neon6mo ago
6 replies
spotty-amber

Foreign Key Problem

When creating a foreign key to a table in another schema, the constraint is generated using the current schema instead of the one explicitly specified.

Example:

FOREIGN KEY (member_id)
REFERENCES keywords.members(id)


But it should be:

FOREIGN KEY (member_id)
REFERENCES clients.members(id)


This causes the constraint to fail because keywords.members does not exist.
Was this page helpful?