fix(mpc-service): use @unique on username field for Prisma upsert compatibility

This commit is contained in:
hailin 2025-12-07 02:19:17 -08:00
parent 84e653d284
commit bad6ba2232
1 changed files with 1 additions and 2 deletions

View File

@ -38,14 +38,13 @@ model MpcWallet {
// =============================================================================
model MpcShare {
id String @id @default(uuid())
username String @db.VarChar(255)
username String @unique @db.VarChar(255)
partyId String @map("party_id") @db.VarChar(255)
partyIndex Int @map("party_index")
encryptedShare String @map("encrypted_share") @db.Text
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @updatedAt @map("updated_at")
@@unique([username], name: "uq_ms_username")
@@index([username], name: "idx_ms_username")
@@map("mpc_shares")
}