GenerateNU / Algo

Fullstack application for the Algo project
6 stars 0 forks source link

Created "Following" Table and Sample Data in DB Schema #11

Closed briana-torres closed 8 months ago

briana-torres commented 8 months ago

Summary:

This PR introduces the 'following' table to our database schema, allowing us to track the relationships where users follow other users. It also includes the insertion of initial dummy data to facilitate immediate testing and interaction with the new table structure. Once all the tables are finalized and the schema is merged into the main branch, I'll add more dummy data.

I was able to run this locally and see the "following" table without issue.

Changes:

  1. Created the 'following' table with the necessary fields: following_id, follower_user_id, following_user_id, and follow_date.
  2. Established constraints to ensure data integrity: each pair of users has a unique follow relationship, and a user cannot follow themselves.
  3. Added indexes on follower_user_id and following_user_id to optimize query performance.
  4. Inserted initial dummy data to set up basic following relationships for immediate use and testing.