Skip to content

Commit

Permalink
Make page reference project
Browse files Browse the repository at this point in the history
gramliu committed Dec 6, 2023
1 parent 75e229b commit b49cfab
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/database/prisma/schema.prisma
Original file line number Diff line number Diff line change
@@ -20,16 +20,15 @@ model Repository {
active Boolean @default(true)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
pages Page[]
project Project?
}

model Page {
id String @id @map("_id")
canvasPageId String
repositoryId String
repository Repository @relation(fields: [repositoryId], references: [id])
projectId String
project Project @relation(fields: [projectId], references: [id])
name String
standaloneCode String?
@@ -38,7 +37,7 @@ model Page {
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@unique([repositoryId, canvasPageId])
@@unique([projectId, canvasPageId])
}

model Project {
@@ -53,6 +52,7 @@ model Project {
framework String
frameworkOptions String[]
pages Page[]
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt

0 comments on commit b49cfab

Please sign in to comment.