-
Notifications
You must be signed in to change notification settings - Fork 8
Migration final deploy #132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
cb2b48d
1501798
477d1a8
c2ca179
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| -- Add isFileSubmission flag to submissions to differentiate file vs URL entries | ||
| ALTER TABLE "submission" | ||
| ADD COLUMN IF NOT EXISTS "isFileSubmission" BOOLEAN NOT NULL DEFAULT false; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| -- Improve review lookups that combine submission/phase filters with ordering | ||
| CREATE INDEX "review_submissionId_id_idx" ON "review"("submissionId", "id"); | ||
| CREATE INDEX "review_phaseId_id_idx" ON "review"("phaseId", "id"); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| -- Add a composite index to speed up paginated lookups by review item | ||
| CREATE INDEX IF NOT EXISTS "reviewItemComment_reviewItemId_sortOrder_id_idx" | ||
| ON "reviews"."reviewItemComment"("reviewItemId", "sortOrder", "id"); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -180,8 +180,10 @@ model review { | |
|
|
||
| @@index([committed]) // Index for filtering by committed status | ||
| @@index([submissionId]) // Index for filtering by submission | ||
| @@index([submissionId, id]) // Helps ORDER BY id after filtering by submission | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [ |
||
| @@index([resourceId]) // Index for filtering by resource (reviewer) | ||
| @@index([phaseId]) // Index for filtering by phase | ||
| @@index([phaseId, id]) // Helps ORDER BY id after filtering by phase | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [ |
||
| @@index([scorecardId]) // Index for joining with scorecard table | ||
| @@index([status]) // Index for filtering by review status | ||
| @@index([status, phaseId]) | ||
|
|
@@ -228,6 +230,7 @@ model reviewItemComment { | |
| appeal appeal? | ||
|
|
||
| @@index([reviewItemId]) // Index for joining with reviewItem table | ||
| @@index([reviewItemId, sortOrder, id]) // Helps ordered pagination on review item comments | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [ |
||
| @@index([id]) // Index for direct ID lookups | ||
| @@index([resourceId]) // Index for filtering by resource (commenter) | ||
| @@index([type]) // Index for filtering by comment type | ||
|
|
@@ -397,6 +400,7 @@ model submission { | |
| fileSize Int? | ||
| viewCount Int? | ||
| systemFileName String? | ||
| isFileSubmission Boolean @default(false) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [ |
||
| thurgoodJobId String? | ||
| virusScan Boolean @default(false) | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[⚠️
performance]Consider adding an index on the
isFileSubmissioncolumn if it will be frequently queried or filtered on. This can improve query performance.