mirror of
https://github.com/Drop-OSS/drop
synced 2026-08-27 14:23:05 -04:00
fix: allow notification nonce reuse per user
This commit is contained in:
parent
3ad801b072
commit
8b57ef9dd5
2 changed files with 14 additions and 1 deletions
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
Warnings:
|
||||
|
||||
- A unique constraint covering the columns `[userId,nonce]` on the table `Notification` will be added. If there are existing duplicate values, this will fail.
|
||||
|
||||
*/
|
||||
-- DropIndex
|
||||
DROP INDEX "Notification_nonce_key";
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "Notification_userId_nonce_key" ON "Notification"("userId", "nonce");
|
||||
|
|
@ -24,7 +24,7 @@ model User {
|
|||
model Notification {
|
||||
id String @id @default(uuid())
|
||||
|
||||
nonce String? @unique
|
||||
nonce String?
|
||||
|
||||
userId String
|
||||
user User @relation(fields: [userId], references: [id])
|
||||
|
|
@ -35,4 +35,6 @@ model Notification {
|
|||
actions String[]
|
||||
|
||||
read Boolean @default(false)
|
||||
|
||||
@@unique([userId, nonce])
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue