Skip to content

Conversation

@hobbescodes
Copy link
Contributor

@hobbescodes hobbescodes commented Dec 31, 2024

Description

Task links: https://linear.app/omnidev/issue/OMNI-141/add-comments-to-database-schema and https://linear.app/omnidev/issue/OMNI-84/add-downvotes-to-database-schema

Updated the database schema to include tables for comments on related posts (feedback) as well as a downvotes table for said post. Updated the seed script and executable schema accordingly.

Test Steps

  1. Verify that logic is sound
  2. Verify that migrations run appropriately
  3. Verify that seed script populates database appropriately

Note

One issue that I see with the seed script is that you can't deterministically make sure each post has a certain number of upvotes and downvotes due to the composite unique constraints on those tables. Keep this in mind when testing the App in insert PR here as you may need to change user ID env to properly find a feedback item that has upvotes / downvotes.

Copy link

@benjamin-parks benjamin-parks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

upvotes, downvotes and comments all populate properly on my end when seeding. lgtm!

hobbescodes and others added 4 commits January 1, 2025 13:35
Co-authored-by: Brian Cooper <20056195+coopbri@users.noreply.github.com>
Co-authored-by: Brian Cooper <20056195+coopbri@users.noreply.github.com>
@hobbescodes hobbescodes merged commit 103c855 into master Jan 2, 2025
@hobbescodes hobbescodes deleted the feature/comments-table branch January 2, 2025 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants