-
Notifications
You must be signed in to change notification settings - Fork 69
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
Create ExerciseComment database table #2404
Conversation
@HS-90 is attempting to deploy a commit to the c0d3-prod Team on Vercel. A member of the Team first needs to authorize it. |
@@ -0,0 +1,2 @@ | |||
-- AlterTable | |||
ALTER TABLE "Discussion" ALTER COLUMN "userPic" DROP NOT NULL; |
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.
Setting userPic to not null, since not every user may have uploaded a profile picture
prisma/migrations/20221006163340_create_discussions_table3/migration.sql
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## master #2404 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 185 185
Lines 3292 3292
Branches 874 888 +14
=========================================
Hits 3292 3292 |
prisma/schema.prisma
Outdated
@@ -207,3 +209,19 @@ model ExerciseSubmission { | |||
|
|||
@@map("exerciseSubmissions") | |||
} | |||
|
|||
model Discussion { |
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.
I'm a little bit confused by naming this table Discussion
. Wouldn't Comment
make more sense?
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.
I feel Discussion
refer to the feature whilst a Comment
refer to the comments in the Discussion
.
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.
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.
What about DiscussionComment
?
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.
Lets finalize all these details before implementation. After implementing this model, we should not have to be touching this model in the backend anymore to finish implementing a MVP for the discussions flow
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.
Lets finalize all these details before implementation. After implementing this model, we should not have to be touching this model in the backend anymore to finish implementing a MVP for the discussions flow
What do you mean by "finalize"? And when is a design doc is considered complete?
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.
If we are following a design doc, all of the architecture should be decided upon before implementation. By finalized details I mean complete design doc. What a complete design doc looks like will differ depending on what feature the design doc was made for. Here are good tips on design docs, it's also in our engineering practices
https://www.industrialempathy.com/posts/design-docs-at-google/
For this discussions flow design doc, enough should be outlined such that the backend and frontend can start work in parallel. If we are still deciding on how the backend should be setup, then that means the frontend can't be worked on yet since the frontend relies on how the backend is setup
Are we certain that this |
I think we will have to add an Although do we want the Also, would it be better to have a |
Looks like the architecture hasn't been finalized yet. Let's get answers to all the open questions you have before implementation. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
Looks good to me. Apply the comments before merging.
Description: relates to #2400
This PR creates the backend data structure in prisma/PostgreSQL.
This sets up the relational database between Discussions, Exercises, and Users. This also includes a self relation for the
replies
property.