@@ -149,102 +149,12 @@ model Organization {
149149 projects Project []
150150 members OrgMember []
151151 invites OrgMemberInvite []
152- externalAccounts ExternalAccount []
153- integrations Integration []
154152 organizationIntegrations OrganizationIntegration []
155153 workerGroups WorkerInstanceGroup []
156154 workerInstances WorkerInstance []
157155 executionSnapshots TaskRunExecutionSnapshot []
158156}
159157
160- model ExternalAccount {
161- id String @id @default (cuid () )
162- identifier String
163- metadata Json ?
164-
165- organization Organization @relation (fields : [organizationId ] , references : [id ] , onDelete : Cascade , onUpdate : Cascade )
166- organizationId String
167-
168- environment RuntimeEnvironment @relation (fields : [environmentId ] , references : [id ] , onDelete : Cascade , onUpdate : Cascade )
169- environmentId String
170-
171- createdAt DateTime @default (now () )
172- updatedAt DateTime @updatedAt
173-
174- @@unique ([environmentId , identifier ] )
175- }
176-
177- // This is a "global" table that store all the integration methods for all the integrations across all orgs
178- model IntegrationAuthMethod {
179- id String @id @default (cuid () )
180- key String
181-
182- name String
183- description String
184- type String
185-
186- client Json ?
187- config Json ?
188- scopes Json ?
189-
190- createdAt DateTime @default (now () )
191- updatedAt DateTime @updatedAt
192-
193- integrations Integration []
194-
195- definition IntegrationDefinition @relation (fields : [definitionId ] , references : [id ] , onDelete : Cascade , onUpdate : Cascade )
196- definitionId String
197-
198- help Json ?
199-
200- @@unique ([definitionId , key ] )
201- }
202-
203- model IntegrationDefinition {
204- id String @id
205- name String
206- instructions String ?
207- description String ?
208- icon String ?
209- packageName String @default (" " )
210-
211- authMethods IntegrationAuthMethod []
212- Integration Integration []
213- }
214-
215- model Integration {
216- id String @id @default (cuid () )
217-
218- slug String
219-
220- title String ?
221- description String ?
222-
223- setupStatus IntegrationSetupStatus @default (COMPLETE )
224- authSource IntegrationAuthSource @default (HOSTED )
225-
226- definition IntegrationDefinition @relation (fields : [definitionId ] , references : [id ] , onDelete : Cascade , onUpdate : Cascade )
227- definitionId String
228-
229- authMethod IntegrationAuthMethod ? @relation (fields : [authMethodId ] , references : [id ] , onDelete : Cascade , onUpdate : Cascade )
230- authMethodId String ?
231-
232- connectionType ConnectionType @default (DEVELOPER )
233-
234- scopes String []
235-
236- customClientReference SecretReference ? @relation (fields : [customClientReferenceId ] , references : [id ] , onDelete : Cascade , onUpdate : Cascade )
237- customClientReferenceId String ?
238-
239- createdAt DateTime @default (now () )
240- updatedAt DateTime @updatedAt
241-
242- organization Organization @relation (fields : [organizationId ] , references : [id ] , onDelete : Cascade , onUpdate : Cascade )
243- organizationId String
244-
245- @@unique ([organizationId , slug ] )
246- }
247-
248158enum IntegrationAuthSource {
249159 HOSTED
250160 LOCAL
@@ -333,7 +243,6 @@ model RuntimeEnvironment {
333243
334244 tunnelId String ?
335245
336- ExternalAccount ExternalAccount []
337246 backgroundWorkers BackgroundWorker []
338247 backgroundWorkerTasks BackgroundWorkerTask []
339248 taskRuns TaskRun []
@@ -491,7 +400,6 @@ model SecretReference {
491400 key String @unique
492401 provider SecretStoreProvider @default (DATABASE )
493402
494- integrations Integration []
495403 environmentVariableValues EnvironmentVariableValue []
496404
497405 createdAt DateTime @default (now () )
0 commit comments