@id @default(cuid()) not working in prisma
When I'm trying to create dayEvent, trpc is throwing this error:
Here is trpc code that creates dayEvent:
Prisma schema:
In Calendar
@id @default(cuid())
is working, I can create calendars.
But for some reason in dayEvent it wants id.
When I give it id, like that:
Everything is working as expected. Despite this, I don't think it will be right to generate ids like that with trpc.
Using full t3 stack with supabase.1 Reply
Maybe you forgot to apply prisma db generate?