mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-14 01:41:24 -06:00
Make contacts unique for the same instance
Avoid duplicated contacts in the database
This commit is contained in:
parent
feb7b795e9
commit
dacd408f8d
@ -130,6 +130,8 @@ model Contact {
|
||||
updatedAt DateTime? @updatedAt @db.Timestamp
|
||||
Instance Instance @relation(fields: [instanceId], references: [id], onDelete: Cascade)
|
||||
instanceId String
|
||||
|
||||
@@unique([remoteJid, instanceId])
|
||||
}
|
||||
|
||||
model Message {
|
||||
|
@ -130,6 +130,8 @@ model Contact {
|
||||
updatedAt DateTime? @updatedAt @db.Timestamp
|
||||
Instance Instance @relation(fields: [instanceId], references: [id], onDelete: Cascade)
|
||||
instanceId String
|
||||
|
||||
@@unique([remoteJid, instanceId])
|
||||
}
|
||||
|
||||
model Message {
|
||||
|
Loading…
Reference in New Issue
Block a user