Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Update Prisma schema #46

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.

Loading