fix(comment): remove unique constraint on session_id to allow multiple agent replies

This commit is contained in:
yiling
2026-05-22 11:05:40 +08:00
parent 71f2ebdd1a
commit 206e1ae7b1
6 changed files with 221 additions and 120 deletions
@@ -0,0 +1,2 @@
-- DropIndex
DROP INDEX "asset_comments_session_id_key";
+2 -2
View File
@@ -430,7 +430,7 @@ model AssetComment {
/// [AnnotationList]
annotation Json?
second Float?
sessionId String? @unique @map("session_id")
sessionId String? @map("session_id")
session AgentSession? @relation(fields: [sessionId], references: [id], onDelete: SetNull)
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @updatedAt @map("updated_at")
@@ -658,7 +658,7 @@ model AgentSession {
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @updatedAt @map("updated_at")
entries AgentSessionEntry[]
comment AssetComment?
comments AssetComment[]
@@map("agent_sessions")
}