mirror of
https://github.com/documenso/documenso.git
synced 2026-06-22 12:22:14 +10:00
fix: allow nullable document audit logs (#2682)
This commit is contained in:
+8
@@ -0,0 +1,8 @@
|
||||
-- DropForeignKey
|
||||
ALTER TABLE "DocumentAuditLog" DROP CONSTRAINT "DocumentAuditLog_envelopeId_fkey";
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "DocumentAuditLog" ALTER COLUMN "envelopeId" DROP NOT NULL;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "DocumentAuditLog" ADD CONSTRAINT "DocumentAuditLog_envelopeId_fkey" FOREIGN KEY ("envelopeId") REFERENCES "Envelope"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
@@ -466,7 +466,7 @@ model EnvelopeItem {
|
||||
|
||||
model DocumentAuditLog {
|
||||
id String @id @default(cuid())
|
||||
envelopeId String
|
||||
envelopeId String?
|
||||
createdAt DateTime @default(now())
|
||||
type String
|
||||
data Json
|
||||
@@ -478,7 +478,7 @@ model DocumentAuditLog {
|
||||
userAgent String?
|
||||
ipAddress String?
|
||||
|
||||
envelope Envelope @relation(fields: [envelopeId], references: [id], onDelete: Cascade)
|
||||
envelope Envelope? @relation(fields: [envelopeId], references: [id], onDelete: SetNull)
|
||||
|
||||
@@index([envelopeId])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user