@@ -181,7 +181,6 @@ model ExternalAccount {
181
181
connections IntegrationConnection []
182
182
events EventRecord []
183
183
runs JobRun []
184
- schedules ScheduleSource []
185
184
triggerSources TriggerSource []
186
185
EventDispatcher EventDispatcher []
187
186
@@ -405,11 +404,9 @@ model RuntimeEnvironment {
405
404
JobQueue JobQueue []
406
405
sources TriggerSource []
407
406
eventDispatchers EventDispatcher []
408
- scheduleSources ScheduleSource []
409
407
ExternalAccount ExternalAccount []
410
408
httpEndpointEnvironments TriggerHttpEndpointEnvironment []
411
409
concurrencyLimitGroups ConcurrencyLimitGroup []
412
- webhookEnvironments WebhookEnvironment []
413
410
backgroundWorkers BackgroundWorker []
414
411
backgroundWorkerTasks BackgroundWorkerTask []
415
412
taskRuns TaskRun []
@@ -540,7 +537,6 @@ model Endpoint {
540
537
dynamictriggers DynamicTrigger []
541
538
sources TriggerSource []
542
539
httpEndpointEnvironments TriggerHttpEndpointEnvironment []
543
- webhookEnvironments WebhookEnvironment []
544
540
545
541
@@unique ([environmentId , slug ] )
546
542
}
@@ -687,9 +683,8 @@ model DynamicTrigger {
687
683
endpoint Endpoint @relation (fields : [endpointId ] , references : [id ] , onDelete : Cascade , onUpdate : Cascade )
688
684
endpointId String
689
685
690
- jobs Job []
691
- sources TriggerSource []
692
- scheduleSources ScheduleSource []
686
+ jobs Job []
687
+ sources TriggerSource []
693
688
694
689
sourceRegistrationJob JobVersion ? @relation (fields : [sourceRegistrationJobId ] , references : [id ] , onDelete : Cascade , onUpdate : Cascade )
695
690
sourceRegistrationJobId String ?
@@ -721,8 +716,6 @@ model EventDispatcher {
721
716
environment RuntimeEnvironment @relation (fields : [environmentId ] , references : [id ] , onDelete : Cascade , onUpdate : Cascade )
722
717
environmentId String
723
718
724
- scheduleSources ScheduleSource []
725
-
726
719
externalAccount ExternalAccount ? @relation (fields : [externalAccountId ] , references : [id ] , onDelete : Cascade , onUpdate : Cascade )
727
720
externalAccountId String ?
728
721
@@ -842,7 +835,6 @@ model JobRun {
842
835
843
836
tasks Task []
844
837
runConnections RunConnection []
845
- executions JobRunExecution []
846
838
847
839
@@index ([jobId , createdAt (sort : Desc ) ] , map : " idx_jobrun_jobId_createdAt " )
848
840
@@index ([organizationId , createdAt ] , map : " idx_jobrun_organizationId_createdAt " )
@@ -868,34 +860,6 @@ enum JobRunStatus {
868
860
INVALID_PAYLOAD
869
861
}
870
862
871
- model JobRunExecution {
872
- id String @id @default (cuid () )
873
-
874
- run JobRun @relation (fields : [runId ] , references : [id ] , onDelete : Cascade , onUpdate : Cascade )
875
- runId String
876
-
877
- retryCount Int @default (0 )
878
- retryLimit Int @default (0 )
879
- retryDelayInMs Int @default (0 )
880
-
881
- createdAt DateTime @default (now () )
882
- updatedAt DateTime @updatedAt
883
- startedAt DateTime ?
884
- completedAt DateTime ?
885
-
886
- error String ?
887
-
888
- reason JobRunExecutionReason @default (EXECUTE_JOB )
889
- status JobRunExecutionStatus @default (PENDING )
890
-
891
- resumeTask Task ? @relation (fields : [resumeTaskId ] , references : [id ] , onDelete : SetNull , onUpdate : Cascade )
892
- resumeTaskId String ?
893
-
894
- graphileJobId String ?
895
-
896
- isRetry Boolean @default (false )
897
- }
898
-
899
863
enum JobRunExecutionReason {
900
864
PREPROCESS
901
865
EXECUTE_JOB
@@ -949,7 +913,6 @@ model Task {
949
913
950
914
children Task [] @relation (" TaskParent " )
951
915
childExecutionMode TaskChildExecutionMode @default (SEQUENTIAL )
952
- executions JobRunExecution []
953
916
954
917
@@unique ([runId , idempotencyKey ] )
955
918
@@index ([parentId ] , map : " idx_task_parentId " )
@@ -1067,8 +1030,6 @@ model Webhook {
1067
1030
key String
1068
1031
params Json ?
1069
1032
1070
- webhookEnvironments WebhookEnvironment []
1071
-
1072
1033
httpEndpoint TriggerHttpEndpoint @relation (fields : [httpEndpointId ] , references : [id ] , onDelete : Cascade , onUpdate : Cascade )
1073
1034
httpEndpointId String @unique
1074
1035
@@ -1084,62 +1045,6 @@ model Webhook {
1084
1045
@@unique ([key , projectId ] )
1085
1046
}
1086
1047
1087
- model WebhookEnvironment {
1088
- id String @id @default (cuid () )
1089
-
1090
- active Boolean @default (false )
1091
-
1092
- config Json ?
1093
- desiredConfig Json ?
1094
-
1095
- endpoint Endpoint @relation (fields : [endpointId ] , references : [id ] , onDelete : Cascade , onUpdate : Cascade )
1096
- endpointId String
1097
-
1098
- environment RuntimeEnvironment @relation (fields : [environmentId ] , references : [id ] , onDelete : Cascade , onUpdate : Cascade )
1099
- environmentId String
1100
-
1101
- webhook Webhook @relation (fields : [webhookId ] , references : [id ] , onDelete : Cascade , onUpdate : Cascade )
1102
- webhookId String
1103
-
1104
- createdAt DateTime @default (now () )
1105
- updatedAt DateTime @updatedAt
1106
-
1107
- @@unique ([environmentId , webhookId ] )
1108
- }
1109
-
1110
- model ScheduleSource {
1111
- id String @id @default (cuid () )
1112
-
1113
- key String
1114
- schedule Json
1115
-
1116
- environment RuntimeEnvironment @relation (fields : [environmentId ] , references : [id ] , onDelete : Cascade , onUpdate : Cascade )
1117
- environmentId String
1118
-
1119
- dispatcher EventDispatcher @relation (fields : [dispatcherId ] , references : [id ] , onDelete : Cascade , onUpdate : Cascade )
1120
- dispatcherId String
1121
-
1122
- lastEventTimestamp DateTime ?
1123
- nextEventTimestamp DateTime ?
1124
-
1125
- workerJobId String ?
1126
-
1127
- active Boolean @default (false )
1128
-
1129
- metadata Json ?
1130
-
1131
- createdAt DateTime @default (now () )
1132
- updatedAt DateTime @updatedAt
1133
-
1134
- dynamicTrigger DynamicTrigger ? @relation (fields : [dynamicTriggerId ] , references : [id ] , onDelete : Cascade , onUpdate : Cascade )
1135
- dynamicTriggerId String ?
1136
-
1137
- externalAccount ExternalAccount ? @relation (fields : [externalAccountId ] , references : [id ] , onDelete : Cascade , onUpdate : Cascade )
1138
- externalAccountId String ?
1139
-
1140
- @@unique ([key , environmentId ] )
1141
- }
1142
-
1143
1048
model TriggerHttpEndpoint {
1144
1049
id String @id @default (cuid () )
1145
1050
0 commit comments