David Marr
03/21/2022, 3:40 PMcreateMany
with a set of data that may have duplicates in the db (based on two non-@id fields)David Marr
03/21/2022, 3:47 PMexternal_id, provider_id
that should be distinct.Richard Ward
03/22/2022, 8:06 AM@@unique[external_id, provider_id]
(I think the syntax is correct)Richard Ward
03/22/2022, 8:07 AMmodel User {
id Int @default(autoincrement())
firstName String
lastName String
isAdmin Boolean @default(false)
@@unique([firstName, lastName])
}
https://www.prisma.io/docs/reference/api-reference/prisma-schema-reference#unique-1David Marr
03/23/2022, 2:11 PM