This error comes up due to the fact that you have a foreign key requirement on your DB.
So you need to check what you inserting into the DB and ensure that your insertion(s) meets up with the foreign key requirement.
This error comes up due to the fact that you have a foreign key requirement on your DB.
So you need to check what you inserting into the DB and ensure that your insertion(s) meets up with the foreign key requirement.
For further actions, you may consider blocking this person and/or reporting abuse
Node.js doesn’t stop from running other operations because of Libuv, a C++ library responsible for the event loop and asynchronously handling tasks such as network requests, DNS resolution, file system operations, data encryption, etc.
What happens under the hood when Node.js works on tasks such as database queries? We will explore it by following this piece of code step by step.
ymc9 -
Abidemi Muibudeen -
Rhuaridh -
JS -
Once suspended, codarbind will not be able to comment or publish posts until their suspension is removed.
Once unsuspended, codarbind will be able to comment and publish posts again.
Once unpublished, all posts by codarbind will become hidden and only accessible to themselves.
If codarbind is not suspended, they can still re-publish their posts from their dashboard.
Once unpublished, this post will become invisible to the public and only accessible to ADEKOLA Abdwahab.
They can still re-publish the post if they are not suspended.
Thanks for keeping DEV Community safe. Here is what you can do to flag codarbind:
Unflagging codarbind will restore default visibility to their posts.
Oldest comments (3)
I got the same issue, and spent hours fixing it thanks
This can also happen when using
upsert
, in our case we had aprisma
@relation
tied to a foreign key/FK
whoseOnUpdate
ReferentialAction
was not changed from the defaultNoAction
.The rather generic error message
Foreign key constraint failed on the field:
fk_ <..> (index)` doesn't help much on pinpointing the cause or any direction whatsoever.Changing the affected
@relation
'sOnUpdate
ReferentialAction
toCascade
enables theupdate
part of anupsert
to go through/work as expected.thank you for contributing