Skip to content

Commit 7d26a64

Browse files
committed
Round 7
1 parent cf1400c commit 7d26a64

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 `JobVersion` table. If the table is not empty, all the data it contains will be lost.
5+
- You are about to drop the `TriggerHttpEndpoint` table. If the table is not empty, all the data it contains will be lost.
6+
7+
*/
8+
-- DropTable
9+
DROP TABLE IF EXISTS "JobVersion" CASCADE;
10+
11+
-- DropTable
12+
DROP TABLE IF EXISTS "TriggerHttpEndpoint" CASCADE;

internal-packages/database/prisma/schema.prisma

Lines changed: 0 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ model Organization {
144144
environments RuntimeEnvironment[]
145145
endpoints Endpoint[]
146146
jobs Job[]
147-
jobVersions JobVersion[]
148147
149148
apiRateLimiterConfig Json?
150149
realtimeRateLimiterConfig Json?
@@ -353,7 +352,6 @@ model RuntimeEnvironment {
353352
tunnelId String?
354353
355354
endpoints Endpoint[]
356-
jobVersions JobVersion[]
357355
JobQueue JobQueue[]
358356
ExternalAccount ExternalAccount[]
359357
concurrencyLimitGroups ConcurrencyLimitGroup[]
@@ -422,8 +420,6 @@ model Project {
422420
environments RuntimeEnvironment[]
423421
endpoints Endpoint[]
424422
jobs Job[]
425-
jobVersion JobVersion[]
426-
httpEndpoints TriggerHttpEndpoint[]
427423
backgroundWorkers BackgroundWorker[]
428424
backgroundWorkerTasks BackgroundWorkerTask[]
429425
taskRuns TaskRun[]
@@ -478,8 +474,6 @@ model Endpoint {
478474
beforeCompleteTaskThreshold Int @default(750)
479475
afterCompleteTaskThreshold Int @default(750)
480476
481-
jobVersions JobVersion[]
482-
483477
@@unique([environmentId, slug])
484478
}
485479

@@ -495,8 +489,6 @@ model Job {
495489
project Project @relation(fields: [projectId], references: [id], onDelete: Cascade, onUpdate: Cascade)
496490
projectId String
497491
498-
versions JobVersion[]
499-
500492
createdAt DateTime @default(now())
501493
updatedAt DateTime @default(now()) @updatedAt
502494
@@ -505,48 +497,6 @@ model Job {
505497
@@unique([projectId, slug])
506498
}
507499

508-
model JobVersion {
509-
id String @id @default(cuid())
510-
version String
511-
eventSpecification Json
512-
513-
properties Json?
514-
triggerLink String?
515-
triggerHelp Json?
516-
517-
job Job @relation(fields: [jobId], references: [id], onDelete: Cascade, onUpdate: Cascade)
518-
jobId String
519-
520-
endpoint Endpoint @relation(fields: [endpointId], references: [id], onDelete: Cascade, onUpdate: Cascade)
521-
endpointId String
522-
523-
environment RuntimeEnvironment @relation(fields: [environmentId], references: [id], onDelete: Cascade, onUpdate: Cascade)
524-
environmentId String
525-
526-
organization Organization @relation(fields: [organizationId], references: [id], onDelete: Cascade, onUpdate: Cascade)
527-
organizationId String
528-
529-
project Project @relation(fields: [projectId], references: [id], onDelete: Cascade, onUpdate: Cascade)
530-
projectId String
531-
532-
queue JobQueue? @relation(fields: [queueId], references: [id])
533-
queueId String?
534-
535-
startPosition JobStartPosition @default(INITIAL)
536-
preprocessRuns Boolean @default(false)
537-
538-
concurrencyLimit Int?
539-
concurrencyLimitGroup ConcurrencyLimitGroup? @relation(fields: [concurrencyLimitGroupId], references: [id])
540-
concurrencyLimitGroupId String?
541-
542-
createdAt DateTime @default(now())
543-
updatedAt DateTime @updatedAt
544-
545-
status JobVersionStatus @default(ACTIVE)
546-
547-
@@unique([jobId, version, environmentId])
548-
}
549-
550500
enum JobVersionStatus {
551501
ACTIVE
552502
DISABLED
@@ -564,8 +514,6 @@ model ConcurrencyLimitGroup {
564514
createdAt DateTime @default(now())
565515
updatedAt DateTime @updatedAt
566516
567-
jobVersion JobVersion[]
568-
569517
@@unique([environmentId, name])
570518
}
571519

@@ -582,8 +530,6 @@ model JobQueue {
582530
jobCount Int @default(0)
583531
maxJobs Int @default(100)
584532
585-
jobVersion JobVersion[]
586-
587533
@@unique([environmentId, name])
588534
}
589535

@@ -652,7 +598,6 @@ model SecretReference {
652598
provider SecretStoreProvider @default(DATABASE)
653599
654600
integrations Integration[]
655-
httpEndpoints TriggerHttpEndpoint[]
656601
environmentVariableValues EnvironmentVariableValue[]
657602
658603
createdAt DateTime @default(now())
@@ -682,27 +627,6 @@ enum TriggerChannel {
682627
SMTP
683628
}
684629

685-
model TriggerHttpEndpoint {
686-
id String @id @default(cuid())
687-
688-
key String
689-
690-
title String?
691-
icon String?
692-
properties Json?
693-
694-
secretReference SecretReference @relation(fields: [secretReferenceId], references: [id], onDelete: Cascade, onUpdate: Cascade)
695-
secretReferenceId String
696-
697-
project Project @relation(fields: [projectId], references: [id], onDelete: Cascade, onUpdate: Cascade)
698-
projectId String
699-
700-
createdAt DateTime @default(now())
701-
updatedAt DateTime @updatedAt
702-
703-
@@unique([key, projectId])
704-
}
705-
706630
model DataMigration {
707631
id String @id @default(cuid())
708632
name String @unique

0 commit comments

Comments
 (0)