© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•2y ago•
3 replies
igo

Can't insert uuid value in uuid foreign key

I'm trying to create a new row in my database, I have just two tables, a table called recollection and another called image. You guys can see the table schemas and the code snippet in the images.

I'm just trying to create a new recollection after creating 3 images with a transaction, but I receive the error:
insert or update on table recollections violates foreign key constraint recollections_original_image_id_images_id_fk
insert or update on table recollections violates foreign key constraint recollections_original_image_id_images_id_fk


I already checked if the id is ok by logging it, and it is.
PS: the extra values i'm passing in recollections insert exists, I hid them in the schema to fit in the print screen
image.png
image.png
image.png
image.png
Drizzle TeamJoin
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,879Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Ignore foreign key violation on bulk insert
Drizzle TeamDTDrizzle Team / help
2y ago
foreign key
Drizzle TeamDTDrizzle Team / help
3y ago
foreign key mismatch
Drizzle TeamDTDrizzle Team / help
2y ago
How to reference composite key in foreign key
Drizzle TeamDTDrizzle Team / help
2y ago