Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Add foreign key constraint with schema #62

Closed
rubenferreira97 opened this issue Feb 1, 2022 · 0 comments
Closed

Feature Request: Add foreign key constraint with schema #62

rubenferreira97 opened this issue Feb 1, 2022 · 0 comments
Labels
bug Something isn't working postgres Related to PostgreSQL

Comments

@rubenferreira97
Copy link

Hi, I am trying to add a foreign key between two different schemas, but I am facing the following problem:

.addForeignKeyConstraint('fk_something', ['accountId'], `${AUTH_SCHEMA}.accounts`, ['id'])

Generated SQL: auth.accounts (incorrect SQL)
Correct SQL: auth.accounts or worst case auth.accounts works

I can't add a db.raw(${AUTH_SCHEMA}.accounts since it expects a string.

@rubenferreira97 rubenferreira97 changed the title Feature Request: Add foreign key constraint with a schema Feature Request: Add foreign key constraint with schema Feb 1, 2022
@igalklebanov igalklebanov added bug Something isn't working postgres Related to PostgreSQL labels Oct 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working postgres Related to PostgreSQL
Projects
None yet
Development

No branches or pull requests

2 participants