Skip to content

Commit dbb8c28

Browse files
committed
Round 3
1 parent 2eaae40 commit dbb8c28

File tree

2 files changed

+12
-76
lines changed

2 files changed

+12
-76
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/*
2+
Warnings:
3+
4+
- You are about to drop the `Task` table. If the table is not empty, all the data it contains will be lost.
5+
- You are about to drop the `Webhook` table. If the table is not empty, all the data it contains will be lost.
6+
7+
*/
8+
-- DropTable
9+
DROP TABLE IF EXISTS "Task" CASCADE;
10+
11+
-- DropTable
12+
DROP TABLE IF EXISTS "Webhook" CASCADE;

internal-packages/database/prisma/schema.prisma

Lines changed: 0 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,6 @@ model Integration {
257257
258258
connections IntegrationConnection[]
259259
sources TriggerSource[]
260-
webhooks Webhook[]
261260
RunConnection RunConnection[]
262261
263262
@@unique([organizationId, slug])
@@ -458,7 +457,6 @@ model Project {
458457
runs JobRun[]
459458
sources TriggerSource[]
460459
httpEndpoints TriggerHttpEndpoint[]
461-
webhooks Webhook[]
462460
backgroundWorkers BackgroundWorker[]
463461
backgroundWorkerTasks BackgroundWorkerTask[]
464462
taskRuns TaskRun[]
@@ -650,8 +648,6 @@ model RunConnection {
650648
createdAt DateTime @default(now())
651649
updatedAt DateTime @updatedAt
652650
653-
tasks Task[]
654-
655651
@@unique([runId, key])
656652
}
657653

@@ -810,7 +806,6 @@ model JobRun {
810806
811807
forceYieldImmediately Boolean @default(false)
812808
813-
tasks Task[]
814809
runConnections RunConnection[]
815810
816811
@@index([jobId, createdAt(sort: Desc)], map: "idx_jobrun_jobId_createdAt")
@@ -849,52 +844,6 @@ enum JobRunExecutionStatus {
849844
FAILURE
850845
}
851846

852-
model Task {
853-
id String @id
854-
idempotencyKey String
855-
displayKey String?
856-
name String
857-
icon String?
858-
859-
status TaskStatus @default(PENDING)
860-
delayUntil DateTime?
861-
noop Boolean @default(false)
862-
863-
description String?
864-
properties Json?
865-
outputProperties Json?
866-
params Json?
867-
output Json?
868-
outputIsUndefined Boolean @default(false)
869-
context Json?
870-
error String?
871-
redact Json?
872-
style Json?
873-
operation String?
874-
callbackUrl String?
875-
876-
startedAt DateTime?
877-
completedAt DateTime?
878-
879-
createdAt DateTime @default(now())
880-
updatedAt DateTime @updatedAt
881-
882-
run JobRun @relation(fields: [runId], references: [id], onDelete: Cascade, onUpdate: Cascade)
883-
runId String
884-
885-
parent Task? @relation("TaskParent", fields: [parentId], references: [id], onDelete: Cascade, onUpdate: Cascade)
886-
parentId String?
887-
888-
runConnection RunConnection? @relation(fields: [runConnectionId], references: [id], onDelete: Cascade, onUpdate: Cascade)
889-
runConnectionId String?
890-
891-
children Task[] @relation("TaskParent")
892-
childExecutionMode TaskChildExecutionMode @default(SEQUENTIAL)
893-
894-
@@unique([runId, idempotencyKey])
895-
@@index([parentId], map: "idx_task_parentId")
896-
}
897-
898847
enum TaskStatus {
899848
PENDING
900849
WAITING
@@ -999,29 +948,6 @@ enum TriggerChannel {
999948
SMTP
1000949
}
1001950

1002-
model Webhook {
1003-
id String @id @default(cuid())
1004-
1005-
active Boolean @default(false)
1006-
1007-
key String
1008-
params Json?
1009-
1010-
httpEndpoint TriggerHttpEndpoint @relation(fields: [httpEndpointId], references: [id], onDelete: Cascade, onUpdate: Cascade)
1011-
httpEndpointId String @unique
1012-
1013-
project Project @relation(fields: [projectId], references: [id], onDelete: Cascade, onUpdate: Cascade)
1014-
projectId String
1015-
1016-
integration Integration @relation(fields: [integrationId], references: [id], onDelete: Cascade, onUpdate: Cascade)
1017-
integrationId String
1018-
1019-
createdAt DateTime @default(now())
1020-
updatedAt DateTime @updatedAt
1021-
1022-
@@unique([key, projectId])
1023-
}
1024-
1025951
model TriggerHttpEndpoint {
1026952
id String @id @default(cuid())
1027953
@@ -1031,8 +957,6 @@ model TriggerHttpEndpoint {
1031957
icon String?
1032958
properties Json?
1033959
1034-
webhook Webhook?
1035-
1036960
secretReference SecretReference @relation(fields: [secretReferenceId], references: [id], onDelete: Cascade, onUpdate: Cascade)
1037961
secretReferenceId String
1038962

0 commit comments

Comments
 (0)