Skip to content

Commit

Permalink
Create unique index for (repositoryId, canvasPageId)
Browse files Browse the repository at this point in the history
  • Loading branch information
gramliu committed Nov 29, 2023
1 parent 7f9275e commit 3172e6e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/database/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ model Repository {
}

model Page {
id String @id @map("_id")
id String @id @map("_id")
canvasPageId String
repositoryId String
repository Repository @relation(fields: [repositoryId], references: [id])
Expand All @@ -37,4 +37,6 @@ model Page {
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@unique([repositoryId, canvasPageId])
}

0 comments on commit 3172e6e

Please sign in to comment.