Skip to content

Commit

Permalink
Update Prisma schema
Browse files Browse the repository at this point in the history
  • Loading branch information
Panora-Prisma Updates Bot committed Nov 1, 2023
1 parent df3e669 commit a967e32
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 53 deletions.
23 changes: 16 additions & 7 deletions packages/api/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ model jobs {
}

model jobs_status_history {
id Int @id(map: "pk_1") @default(autoincrement())
timestamp DateTime @default(now()) @db.Timestamp(6)
previous_status String
new_status String
id_job Int @default(autoincrement())
jobs jobs @relation(fields: [id_job], references: [id_job], onDelete: NoAction, onUpdate: NoAction, map: "fk_4")
id_jobs_status_history Int @id(map: "pk_1") @default(autoincrement())
timestamp DateTime @default(now()) @db.Timestamp(6)
previous_status String
new_status String
id_job Int @default(autoincrement())
jobs jobs @relation(fields: [id_job], references: [id_job], onDelete: NoAction, onUpdate: NoAction, map: "fk_4")
@@index([id_job], map: "id_job_jobs_status_history")
}
Expand All @@ -63,7 +63,6 @@ model organizations {
name String
stripe_customer_id String
timezone String
logo_url String
projects projects[]
users users[]
}
Expand All @@ -86,7 +85,17 @@ model users {
created_at DateTime @default(now()) @db.Timestamp(6)
modified_at DateTime @default(now()) @db.Timestamp(6)
id_organization BigInt
api_keys api_keys[]
organizations organizations @relation(fields: [id_organization], references: [id_organization], onDelete: NoAction, onUpdate: NoAction, map: "fk_5")
@@index([id_organization], map: "fk_1_users")
}

model api_keys {
id_api_key BigInt @id(map: "id_") @default(autoincrement())
api_key String @unique(map: "unique_api_keys")
id_user Int
users users @relation(fields: [id_user], references: [id_user], onDelete: NoAction, onUpdate: NoAction, map: "fk_7")
@@index([id_user], map: "fk_1")
}
50 changes: 4 additions & 46 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a967e32

Please sign in to comment.