Skip to content

Commit d321e4c

Browse files
committed
chore: format prisma schemas
1 parent 9f76c92 commit d321e4c

4 files changed

Lines changed: 25 additions & 22 deletions

File tree

internal-packages/database/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
"scripts": {
1717
"clean": "rimraf dist",
1818
"generate": "node ../../scripts/retry-prisma-generate.mjs",
19-
"db:migrate:dev:create": "prisma migrate dev --create-only",
19+
"db:migrate:dev:create": "pnpm run format:prisma && prisma migrate dev --create-only",
20+
"format:prisma": "prisma format",
2021
"db:migrate:deploy": "prisma migrate deploy",
2122
"db:push": "prisma db push",
2223
"db:studio": "prisma studio",

internal-packages/database/prisma/schema.prisma

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ model OrgMemberInvite {
299299
/// a separate schema (Drizzle, not Prisma) so we can't model the FK
300300
/// here. Validation happens at write time (action) and read time
301301
/// (acceptInvite).
302-
rbacRoleId String?
302+
rbacRoleId String?
303303
organization Organization @relation(fields: [organizationId], references: [id], onDelete: Cascade, onUpdate: Cascade)
304304
organizationId String
305305
@@ -340,9 +340,9 @@ model RuntimeEnvironment {
340340
///A memorable code for the environment
341341
shortcode String
342342
343-
maximumConcurrencyLimit Int @default(5)
344-
concurrencyLimitBurstFactor Decimal @default("2.00") @db.Decimal(4, 2)
345-
paused Boolean @default(false)
343+
maximumConcurrencyLimit Int @default(5)
344+
concurrencyLimitBurstFactor Decimal @default("2.00") @db.Decimal(4, 2)
345+
paused Boolean @default(false)
346346
pauseSource EnvironmentPauseSource?
347347
348348
autoEnableInternalSources Boolean @default(true)
@@ -378,21 +378,21 @@ model RuntimeEnvironment {
378378
taskScheduleInstances TaskScheduleInstance[]
379379
alerts ProjectAlert[]
380380
381-
sessions RuntimeEnvironmentSession[]
382-
currentSession RuntimeEnvironmentSession? @relation("currentSession", fields: [currentSessionId], references: [id], onDelete: SetNull, onUpdate: Cascade)
383-
currentSessionId String?
384-
taskRunNumberCounter TaskRunNumberCounter[]
385-
taskRunCheckpoints TaskRunCheckpoint[]
386-
waitpoints Waitpoint[]
387-
workerInstances WorkerInstance[]
388-
waitpointTags WaitpointTag[]
389-
BulkActionGroup BulkActionGroup[]
390-
customerQueries CustomerQuery[]
391-
prompts Prompt[]
392-
playgroundConversations PlaygroundConversation[]
393-
errorGroupStates ErrorGroupState[]
394-
taskIdentifiers TaskIdentifier[]
395-
revokedApiKeys RevokedApiKey[]
381+
sessions RuntimeEnvironmentSession[]
382+
currentSession RuntimeEnvironmentSession? @relation("currentSession", fields: [currentSessionId], references: [id], onDelete: SetNull, onUpdate: Cascade)
383+
currentSessionId String?
384+
taskRunNumberCounter TaskRunNumberCounter[]
385+
taskRunCheckpoints TaskRunCheckpoint[]
386+
waitpoints Waitpoint[]
387+
workerInstances WorkerInstance[]
388+
waitpointTags WaitpointTag[]
389+
BulkActionGroup BulkActionGroup[]
390+
customerQueries CustomerQuery[]
391+
prompts Prompt[]
392+
playgroundConversations PlaygroundConversation[]
393+
errorGroupStates ErrorGroupState[]
394+
taskIdentifiers TaskIdentifier[]
395+
revokedApiKeys RevokedApiKey[]
396396
397397
@@unique([projectId, slug, orgMemberId])
398398
@@unique([projectId, shortcode])
@@ -2479,7 +2479,7 @@ model BulkActionGroup {
24792479
environment RuntimeEnvironment? @relation(fields: [environmentId], references: [id], onDelete: Cascade, onUpdate: Cascade)
24802480
environmentId String?
24812481
2482-
type BulkActionType
2482+
type BulkActionType
24832483
24842484
/// When the group is created it's pending. After we've processed all the items it's completed. This does not mean the associated runs are completed.
24852485
status BulkActionStatus @default(PENDING)

internal-packages/run-ops-database/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
"scripts": {
2727
"clean": "rimraf dist",
2828
"generate": "node ../../scripts/retry-prisma-generate.mjs",
29-
"db:migrate:dev:create": "prisma migrate dev --create-only",
29+
"db:migrate:dev:create": "pnpm run format:prisma && prisma migrate dev --create-only",
30+
"format:prisma": "prisma format",
3031
"db:migrate:deploy": "node scripts/migrate.mjs deploy",
3132
"db:migrate:status": "node scripts/migrate.mjs status",
3233
"db:push": "prisma db push",

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"i:dev": "infisical run -- turbo run dev",
2020
"generate": "turbo run generate",
2121
"format": "oxfmt .",
22+
"format:prisma": "pnpm --filter @trigger.dev/database run format:prisma && pnpm --filter @internal/run-ops-database run format:prisma",
2223
"lint": "oxlint",
2324
"lint:fix": "oxlint --fix",
2425
"docker": "node scripts/docker.mjs -f docker/docker-compose.yml up -d --build --remove-orphans",

0 commit comments

Comments
 (0)