Skip to content

Commit

Permalink
fix(Goal): unique constraint for scopeId
Browse files Browse the repository at this point in the history
  • Loading branch information
awinogradov committed Jun 21, 2023
1 parent abc07cc commit ca34b45
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions prisma/migrations/20230621101038_/migration.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/*
Warnings:
- A unique constraint covering the columns `[projectId,scopeId]` on the table `Goal` will be added. If there are existing duplicate values, this will fail.
*/
-- CreateIndex
CREATE UNIQUE INDEX "Goal_projectId_scopeId_key" ON "Goal"("projectId", "scopeId");
2 changes: 2 additions & 0 deletions prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,8 @@ model Goal {
@@index([ownerId])
@@index([activityId])
@@unique([projectId, scopeId])
}

model Filter {
Expand Down

0 comments on commit ca34b45

Please sign in to comment.