2
0

🗃️ Add createdAt to sort transcript answers

This commit is contained in:
Baptiste Arnaud
2024-05-22 15:44:49 +02:00
parent ab9e36f68d
commit 79ad1f63de
6 changed files with 34 additions and 17 deletions

View File

@@ -320,11 +320,12 @@ model Answer {
}
model AnswerV2 {
id Int @id @default(autoincrement())
blockId String
content String @db.Text
resultId String
result Result @relation(fields: [resultId], references: [id], onDelete: Cascade)
id Int @id @default(autoincrement())
createdAt DateTime @default(now())
blockId String
content String @db.Text
resultId String
result Result @relation(fields: [resultId], references: [id], onDelete: Cascade)
@@index([resultId])
@@index([blockId])

View File

@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "AnswerV2" ADD COLUMN "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP;

View File

@@ -300,11 +300,12 @@ model Answer {
}
model AnswerV2 {
id Int @id @default(autoincrement())
blockId String
content String
resultId String
result Result @relation(fields: [resultId], references: [id], onDelete: Cascade)
id Int @id @default(autoincrement())
createdAt DateTime @default(now())
blockId String
content String
resultId String
result Result @relation(fields: [resultId], references: [id], onDelete: Cascade)
@@index([blockId])
}