Skip to content

Commit ef9c298

Browse files
committed
Round 3
1 parent 0d52755 commit ef9c298

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])
@@ -476,7 +475,6 @@ model Project {
476475
runs JobRun[]
477476
sources TriggerSource[]
478477
httpEndpoints TriggerHttpEndpoint[]
479-
webhooks Webhook[]
480478
backgroundWorkers BackgroundWorker[]
481479
backgroundWorkerTasks BackgroundWorkerTask[]
482480
taskRuns TaskRun[]
@@ -668,8 +666,6 @@ model RunConnection {
668666
createdAt DateTime @default(now())
669667
updatedAt DateTime @updatedAt
670668
671-
tasks Task[]
672-
673669
@@unique([runId, key])
674670
}
675671

@@ -828,7 +824,6 @@ model JobRun {
828824
829825
forceYieldImmediately Boolean @default(false)
830826
831-
tasks Task[]
832827
runConnections RunConnection[]
833828
834829
@@index([jobId, createdAt(sort: Desc)], map: "idx_jobrun_jobId_createdAt")
@@ -867,52 +862,6 @@ enum JobRunExecutionStatus {
867862
FAILURE
868863
}
869864

870-
model Task {
871-
id String @id
872-
idempotencyKey String
873-
displayKey String?
874-
name String
875-
icon String?
876-
877-
status TaskStatus @default(PENDING)
878-
delayUntil DateTime?
879-
noop Boolean @default(false)
880-
881-
description String?
882-
properties Json?
883-
outputProperties Json?
884-
params Json?
885-
output Json?
886-
outputIsUndefined Boolean @default(false)
887-
context Json?
888-
error String?
889-
redact Json?
890-
style Json?
891-
operation String?
892-
callbackUrl String?
893-
894-
startedAt DateTime?
895-
completedAt DateTime?
896-
897-
createdAt DateTime @default(now())
898-
updatedAt DateTime @updatedAt
899-
900-
run JobRun @relation(fields: [runId], references: [id], onDelete: Cascade, onUpdate: Cascade)
901-
runId String
902-
903-
parent Task? @relation("TaskParent", fields: [parentId], references: [id], onDelete: Cascade, onUpdate: Cascade)
904-
parentId String?
905-
906-
runConnection RunConnection? @relation(fields: [runConnectionId], references: [id], onDelete: Cascade, onUpdate: Cascade)
907-
runConnectionId String?
908-
909-
children Task[] @relation("TaskParent")
910-
childExecutionMode TaskChildExecutionMode @default(SEQUENTIAL)
911-
912-
@@unique([runId, idempotencyKey])
913-
@@index([parentId], map: "idx_task_parentId")
914-
}
915-
916865
enum TaskStatus {
917866
PENDING
918867
WAITING
@@ -1017,29 +966,6 @@ enum TriggerChannel {
1017966
SMTP
1018967
}
1019968

1020-
model Webhook {
1021-
id String @id @default(cuid())
1022-
1023-
active Boolean @default(false)
1024-
1025-
key String
1026-
params Json?
1027-
1028-
httpEndpoint TriggerHttpEndpoint @relation(fields: [httpEndpointId], references: [id], onDelete: Cascade, onUpdate: Cascade)
1029-
httpEndpointId String @unique
1030-
1031-
project Project @relation(fields: [projectId], references: [id], onDelete: Cascade, onUpdate: Cascade)
1032-
projectId String
1033-
1034-
integration Integration @relation(fields: [integrationId], references: [id], onDelete: Cascade, onUpdate: Cascade)
1035-
integrationId String
1036-
1037-
createdAt DateTime @default(now())
1038-
updatedAt DateTime @updatedAt
1039-
1040-
@@unique([key, projectId])
1041-
}
1042-
1043969
model TriggerHttpEndpoint {
1044970
id String @id @default(cuid())
1045971
@@ -1049,8 +975,6 @@ model TriggerHttpEndpoint {
1049975
icon String?
1050976
properties Json?
1051977
1052-
webhook Webhook?
1053-
1054978
secretReference SecretReference @relation(fields: [secretReferenceId], references: [id], onDelete: Cascade, onUpdate: Cascade)
1055979
secretReferenceId String
1056980

0 commit comments

Comments
 (0)