```model serververification { id S...
# orm-help
l
Copy code
model serververification {
  id               String  @id @default(cuid())
  guildId          String  @db.VarChar(20)
  enabled          Boolean @db.Bit(1)
  unverifiedRoleId String? @db.VarChar(20)
  panelMessageId   String? @db.VarChar(20)
  panelChannelId   String? @db.VarChar(20)
  logChannelId     String? @db.VarChar(20)
  verifiedRoleIds  String? @db.LongText

  @@index([guildId], map: "guildId_fkey")
}
Hey, if my prisma schema looks like this, then my
prisma.serververfication.create
shouldn't be asking me to input an
id
right? It should create and generate a unique key for the
id
field? Because it doesn't seem to be doing that, it tells me its missing a required field.
Copy code
serververificationCreateInput.id`: A value is required but not set
1
👀 1
r
Hi @Logan 👋 At first glance, your model is correct as i've been able to use it to create a record. Yes, Prisma should create and generate a primary key for the id field. However to help debug the issue you are facing, I'll need you to please provide the full create query you are performing. Also, you can take a look at the docs on how to work with
cuid
.
1
l
Hey Raphael, Thanks for the response. I actually found the issue not too long ago. It turns out my prisma client was not being updated when running prisma generate, so I had to manually update it myself. Thanks 🙂
👍 1