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

ForeignKeyConstraintViolation on create #12

Open
blms opened this issue May 16, 2021 · 2 comments
Open

ForeignKeyConstraintViolation on create #12

blms opened this issue May 16, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@blms
Copy link
Member

blms commented May 16, 2021

Suddenly I can no longer create any new many-to-many relations. For example, creating an event I get the following error:

ConnectorError(ConnectorError { user_facing_error: None, kind: ForeignKeyConstraintViolation { constraint: Index("LocationOnEvent_B_fkey") } })

This wasn't happening as of a couple of months ago. This breaks the functionality of creating any new entries in the archive.

@blms blms added the bug Something isn't working label May 16, 2021
@blms
Copy link
Member Author

blms commented May 16, 2021

It actually proceeds to create things including the M2M relations so it may just be an ignorable error that needs better handling on the frontend.

@blms
Copy link
Member Author

blms commented Jul 1, 2021

This may be fixed with the referentialActions preview feature in Prisma.

https://github.com/prisma/prisma/releases/tag/2.26.0

It also should allow removal of raw SQL from the following:

https://github.com/mitaai/usiran-data-store/blob/master/graphql/Mutations/update.ts
https://github.com/mitaai/usiran-data-store/blob/master/graphql/Mutations/delete.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant