Skip to content

Commit 2eaae40

Browse files
committed
Remove trigger http endpoint env
1 parent 8a17249 commit 2eaae40

File tree

2 files changed

+16
-41
lines changed

2 files changed

+16
-41
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 column `httpEndpointEnvironmentId` on the `EventRecord` table. All the data in the column will be lost.
5+
- You are about to drop the `TriggerHttpEndpointEnvironment` table. If the table is not empty, all the data it contains will be lost.
6+
7+
*/
8+
-- AlterTable
9+
ALTER TABLE "EventRecord" DROP COLUMN IF EXISTS "httpEndpointEnvironmentId" CASCADE;
10+
11+
-- DropTable
12+
DROP TABLE IF EXISTS "TriggerHttpEndpointEnvironment" CASCADE;

internal-packages/database/prisma/schema.prisma

Lines changed: 4 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,6 @@ model RuntimeEnvironment {
389389
sources TriggerSource[]
390390
eventDispatchers EventDispatcher[]
391391
ExternalAccount ExternalAccount[]
392-
httpEndpointEnvironments TriggerHttpEndpointEnvironment[]
393392
concurrencyLimitGroups ConcurrencyLimitGroup[]
394393
backgroundWorkers BackgroundWorker[]
395394
backgroundWorkerTasks BackgroundWorkerTask[]
@@ -514,11 +513,10 @@ model Endpoint {
514513
beforeCompleteTaskThreshold Int @default(750)
515514
afterCompleteTaskThreshold Int @default(750)
516515
517-
jobVersions JobVersion[]
518-
jobRuns JobRun[]
519-
dynamictriggers DynamicTrigger[]
520-
sources TriggerSource[]
521-
httpEndpointEnvironments TriggerHttpEndpointEnvironment[]
516+
jobVersions JobVersion[]
517+
jobRuns JobRun[]
518+
dynamictriggers DynamicTrigger[]
519+
sources TriggerSource[]
522520
523521
@@unique([environmentId, slug])
524522
}
@@ -736,9 +734,6 @@ model EventRecord {
736734
httpEndpoint TriggerHttpEndpoint? @relation(fields: [httpEndpointId], references: [id], onDelete: Cascade, onUpdate: Cascade)
737735
httpEndpointId String?
738736
739-
httpEndpointEnvironment TriggerHttpEndpointEnvironment? @relation(fields: [httpEndpointEnvironmentId], references: [id], onDelete: Cascade, onUpdate: Cascade)
740-
httpEndpointEnvironmentId String?
741-
742737
deliverAt DateTime @default(now())
743738
deliveredAt DateTime?
744739
@@ -1047,43 +1042,11 @@ model TriggerHttpEndpoint {
10471042
createdAt DateTime @default(now())
10481043
updatedAt DateTime @updatedAt
10491044
1050-
httpEndpointEnvironments TriggerHttpEndpointEnvironment[]
1051-
10521045
eventRecords EventRecord[]
10531046
10541047
@@unique([key, projectId])
10551048
}
10561049

1057-
model TriggerHttpEndpointEnvironment {
1058-
id String @id @default(cuid())
1059-
1060-
active Boolean @default(false)
1061-
1062-
/// If this is set, requests will be tested against the filter and we'll call the user's server immediately
1063-
immediateResponseFilter Json?
1064-
1065-
skipTriggeringRuns Boolean @default(false)
1066-
1067-
source String
1068-
1069-
environment RuntimeEnvironment @relation(fields: [environmentId], references: [id], onDelete: Cascade, onUpdate: Cascade)
1070-
environmentId String
1071-
1072-
endpoint Endpoint @relation(fields: [endpointId], references: [id], onDelete: Cascade, onUpdate: Cascade)
1073-
endpointId String
1074-
1075-
httpEndpoint TriggerHttpEndpoint @relation(fields: [httpEndpointId], references: [id], onDelete: Cascade, onUpdate: Cascade)
1076-
httpEndpointId String
1077-
1078-
eventRecords EventRecord[]
1079-
1080-
createdAt DateTime @default(now())
1081-
updatedAt DateTime @updatedAt
1082-
1083-
@@unique([environmentId, httpEndpointId])
1084-
@@unique([endpointId, httpEndpointId])
1085-
}
1086-
10871050
model DataMigration {
10881051
id String @id @default(cuid())
10891052
name String @unique

0 commit comments

Comments
 (0)