MrDell
07/11/2022, 4:09 PMmodel Player {
id BigInt @id
createdAt DateTime? @default(now())
region String
country String
timezone String
Tournaments Tournament[]
}
and here i am trying to create the record in database.
await prisma.player.create({
data: {
id: Number(interaction.user.id),
region: region,
timezone: REGION[region][country]["timezone"],
country: country,
}),
Here's the error which is showed in terminal.
Error:
Invalid `prisma.player.create()` invocation:
Unique constraint failed on the fields: (`id`)
Can anyone tell me what's going wrong here? Any help would be appreciated!