feat: add completed at timestamp

This commit is contained in:
Mythie
2023-11-03 15:48:19 +11:00
parent f841683d82
commit 2065a0debc
3 changed files with 6 additions and 0 deletions

View File

@ -0,0 +1,4 @@
-- AlterTable
ALTER TABLE "Document" ADD COLUMN "completedAt" TIMESTAMP(3);
UPDATE "Document" SET "completedAt" = "updatedAt" WHERE "status" = 'COMPLETED';

View File

@ -120,6 +120,7 @@ model Document {
documentMeta DocumentMeta?
createdAt DateTime @default(now())
updatedAt DateTime @default(now()) @updatedAt
completedAt DateTime?
@@unique([documentDataId])
@@index([userId])