Skip to content

Commit 53dac06

Browse files
committed
Scout model path
1 parent 8688233 commit 53dac06

File tree

2 files changed

+55
-39
lines changed

2 files changed

+55
-39
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/*
2+
Warnings:
3+
4+
- A unique constraint covering the columns `[path]` on the table `Scout` will be added. If there are existing duplicate values, this will fail.
5+
6+
*/
7+
-- AlterTable
8+
ALTER TABLE "Scout" ADD COLUMN "path" TEXT;
9+
10+
-- CreateIndex
11+
CREATE UNIQUE INDEX "Scout_path_key" ON "Scout"("path");
12+
13+
-- CreateIndex
14+
CREATE INDEX "Scout_path_idx" ON "Scout"("path");

src/prisma/schema.prisma

Lines changed: 41 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1356,46 +1356,46 @@ model ProposalEvaluationPermission {
13561356
}
13571357

13581358
model ProposalEvaluation {
1359-
id String @id @default(uuid()) @db.Uuid
1360-
index Int // tells us what order
1361-
title String
1362-
type ProposalEvaluationType
1363-
completedAt DateTime?
1364-
declinedAt DateTime? // Required to keep track of when the evaluation was declined for an appealable step
1365-
snapshotId String?
1366-
snapshotExpiry DateTime?
1367-
decidedBy String? @db.Uuid
1368-
decider User? @relation(fields: [decidedBy], references: [id], onDelete: SetNull, name: "decidedBy")
1369-
proposalId String @db.Uuid
1370-
proposal Proposal @relation(fields: [proposalId], references: [id], onDelete: Cascade)
1371-
voteSettings Json?
1372-
voteId String? @unique @db.Uuid
1373-
vote Vote? @relation(fields: [voteId], references: [id], onDelete: SetNull)
1374-
actionLabels Json?
1375-
notificationLabels Json?
1376-
requiredReviews Int @default(1)
1377-
finalStep Boolean?
1378-
appealRequiredReviews Int?
1379-
appealable Boolean? @default(false)
1380-
appealedAt DateTime?
1381-
appealedBy String? @db.Uuid
1382-
appealReason String?
1383-
appealer User? @relation(fields: [appealedBy], references: [id], onDelete: SetNull, name: "appealedBy")
1384-
shareReviews Boolean? @default(false)
1385-
dueDate DateTime?
1359+
id String @id @default(uuid()) @db.Uuid
1360+
index Int // tells us what order
1361+
title String
1362+
type ProposalEvaluationType
1363+
completedAt DateTime?
1364+
declinedAt DateTime? // Required to keep track of when the evaluation was declined for an appealable step
1365+
snapshotId String?
1366+
snapshotExpiry DateTime?
1367+
decidedBy String? @db.Uuid
1368+
decider User? @relation(fields: [decidedBy], references: [id], onDelete: SetNull, name: "decidedBy")
1369+
proposalId String @db.Uuid
1370+
proposal Proposal @relation(fields: [proposalId], references: [id], onDelete: Cascade)
1371+
voteSettings Json?
1372+
voteId String? @unique @db.Uuid
1373+
vote Vote? @relation(fields: [voteId], references: [id], onDelete: SetNull)
1374+
actionLabels Json?
1375+
notificationLabels Json?
1376+
requiredReviews Int @default(1)
1377+
finalStep Boolean?
1378+
appealRequiredReviews Int?
1379+
appealable Boolean? @default(false)
1380+
appealedAt DateTime?
1381+
appealedBy String? @db.Uuid
1382+
appealReason String?
1383+
appealer User? @relation(fields: [appealedBy], references: [id], onDelete: SetNull, name: "appealedBy")
1384+
shareReviews Boolean? @default(false)
1385+
dueDate DateTime?
13861386
showAuthorResultsOnRubricFail Boolean?
1387-
rubricCriteria ProposalRubricCriteria[]
1388-
rubricAnswers ProposalRubricCriteriaAnswer[]
1389-
draftRubricAnswers DraftProposalRubricCriteriaAnswer[]
1390-
result ProposalEvaluationResult?
1391-
reviewers ProposalReviewer[]
1392-
appealReviewers ProposalAppealReviewer[]
1393-
permissions ProposalEvaluationPermission[]
1394-
proposalNotification ProposalNotification[]
1395-
reviews ProposalEvaluationReview[]
1396-
appealReviews ProposalEvaluationAppealReview[]
1397-
documentsToSign DocumentToSign[]
1398-
evaluationApprovers ProposalEvaluationApprover[]
1387+
rubricCriteria ProposalRubricCriteria[]
1388+
rubricAnswers ProposalRubricCriteriaAnswer[]
1389+
draftRubricAnswers DraftProposalRubricCriteriaAnswer[]
1390+
result ProposalEvaluationResult?
1391+
reviewers ProposalReviewer[]
1392+
appealReviewers ProposalAppealReviewer[]
1393+
permissions ProposalEvaluationPermission[]
1394+
proposalNotification ProposalNotification[]
1395+
reviews ProposalEvaluationReview[]
1396+
appealReviews ProposalEvaluationAppealReview[]
1397+
documentsToSign DocumentToSign[]
1398+
evaluationApprovers ProposalEvaluationApprover[]
13991399
14001400
@@index([proposalId])
14011401
@@index([index])
@@ -2792,6 +2792,7 @@ model Scout {
27922792
id String @id @default(uuid()) @db.Uuid
27932793
email String?
27942794
username String @unique
2795+
path String? @unique
27952796
displayName String
27962797
farcasterId Int? @unique
27972798
farcasterName String? // every user only has one farcaster account
@@ -2820,6 +2821,7 @@ model Scout {
28202821
builderCardActivities BuilderCardActivity[]
28212822
28222823
@@index([username])
2824+
@@index([path])
28232825
@@index([farcasterId])
28242826
@@index([walletAddress])
28252827
}

0 commit comments

Comments
 (0)