-
Notifications
You must be signed in to change notification settings - Fork 9
feat(PM-2177): modified schema to support vote tracking #167
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
Conversation
prisma/migrations/20251117152627_add_vote_tracking_to_ai_workflow_run_items/migration.sql
Show resolved
Hide resolved
prisma/migrations/20251117152627_add_vote_tracking_to_ai_workflow_run_items/migration.sql
Show resolved
Hide resolved
prisma/migrations/20251113212614_add_vote_tracking_to_ai_workflow_run_items/migration.sql
Outdated
Show resolved
Hide resolved
prisma/migrations/20251113212614_add_vote_tracking_to_ai_workflow_run_items/migration.sql
Outdated
Show resolved
Hide resolved
src/dto/aiWorkflow.dto.ts
Outdated
| @IsInt() | ||
| @IsOptional() | ||
| upVotes?: number; | ||
| upVote?: number; |
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.
[❗❗ correctness]
The upVote field is still defined as an integer in UpdateRunItemCommentDto, whereas it was changed to a boolean in CreateAiWorkflowRunItemDto. Ensure consistency across DTOs unless there's a specific reason for this difference.
kkartunov
left a comment
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.
@hentrymartin , we can go with proposed structure regardless of mismatch with JIRA spec. Need to work on:
- Fix the requsted changes on models level
- Maybe a mistake but not seeing votes included in API response to GET calls to related enpoints. Votes data will be required by the app on front-end.
prisma/migrations/20251117152041_add_vote_tracking_to_ai_workflow_run_items/migration.sql
Outdated
Show resolved
Hide resolved
prisma/migrations/20251117152041_add_vote_tracking_to_ai_workflow_run_items/migration.sql
Outdated
Show resolved
Hide resolved
| workflowRunItemCommentId String @db.VarChar(14) | ||
| voteType VoteType | ||
| createdAt DateTime @default(now()) @db.Timestamp(3) | ||
| createdBy String @db.Text |
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.
[❗❗ correctness]
The createdBy field has been changed from String? to String, making it mandatory. Verify that this change is compatible with existing data and logic, as it may cause issues if createdBy is not consistently set.
I've updated the PR based on this review comments @kkartunov |
What's in this PR?
Ticket link - https://topcoder.atlassian.net/browse/PM-2955