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:
But it should be:
This causes the constraint to fail because
keywords.members
does not exist.5 Replies
conscious-sapphire•2mo ago
When you say the constraint is generated, does that mean you are creating it using an ORM? I am wondering if it might be picking up your default Postgres search_path.
wise-whiteOP•2mo ago
i use the web dashboard
wise-whiteOP•2mo ago
but the keywords.members doesnt exist

conscious-sapphire•2mo ago
Ok. You're on our Tables page. I'll bring this up with the Drizzle Studio team.
This is a bug. It will be fixed in the next release of Drizzle Studio. We're currently at version 1.2.3. It will be fixed in 1.2.4. I'd expect that to go out early next week. Sorry for the inconvenience.
An alternative would be to use the SQL Editor to add constraints.
wise-whiteOP•2mo ago
Okay thanks