Something went wrong. Try again.
An open-source, container-based Platform-as-a-Service (PAAS) for seamless deployments and effortless infrastructure management — built on f…
Something went wrong. Try again.
1.9 kB · 87 lines
at master
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
// This is your Prisma schema file,// learn more about it in the docs: https://pris.ly/d/prisma-schema
// Looking for ways to speed up your queries, or scale easily with your serverless or edge functions?// Try Prisma Accelerate: https://pris.ly/cli/accelerate-init
generator client { provider = "prisma-client-js"}
datasource db { provider = "postgresql" url = env("DATABASE_URL")}
// ----------------------------------- MODELS -----------------------------------
model User { id String @id @default(cuid()) email String @unique password String name String avatar String ? role Role @default(USER) createdAt DateTime @default(now()) updatedAt DateTime @updatedAt
// Project Project[]}
model Project { id String @id @default(cuid()) name String description String ? service Service @default(WEB) slug String @unique gitUrl String customDomain String ? cmd String ? envSecrets Json ? envFile String ? buildCmd String ? runCmd String ? createdAt DateTime @default(now()) updatedAt DateTime @updatedAt
currentDeploymentId String ? @map("current_deployment_id") // foreign key Deployment Deployment[] // user User @relation(fields: [userId], references: [id]) // userId String @map("user_id") // foreign key}
model Deployment { id String @id @default(cuid()) status DeploymentStatus @default(QUEUED) createdAt DateTime @default(now()) updatedAt DateTime @updatedAt projectId String @map("project_id") // foreign key project Project @relation(fields: [projectId], references: [id])}
// ----------------------------------- ENUMS -----------------------------------
enum Role { USER ADMIN}
enum Service { WEB WORKER CRON}
enum DeploymentStatus { QUEUED IN_PROGRESS SUCCESS FAILED CANCELLED}