There is not enough information to infer relation
Hello,
I am running into a issue where drizzle studio is stating that there is not enought information to infer relation
"__public__.tickets.chat"
. Any idea why this might be?
I have the following schema:
4 Replies
The weird thing is that as far as I can tell this is a one-to-one relation, so much of the advice on other tables does not apply here
Link to the full schema: https://github.com/acmutsa/HackKit/blob/dev/packages/db/schema.ts
GitHub
HackKit/packages/db/schema.ts at dev · acmutsa/HackKit
Feature-packed Hackathon Managment Software. Contribute to acmutsa/HackKit development by creating an account on GitHub.
I am not sure since i have not used drizzle for so long. Is your relations syntax correct? As i remember i had to set references field
Hi there. In
ticketRelations
you're defining that a ticket has one chat, so in chatRelations
, you need to define that a chat has many tickets or one ticket (not sure what the relationship is that you're aiming for) or remove the ticket and chat relation in ticketRelations
(if the two are not meant to be related)