user_follows table

The user_follows table in the Reddit Clone Database Schema schema has 3 columns, with 2 foreign keys to users.

Profile follows. Critically this does NOT drive the home feed - it only surfaces a persons profile posts. Wiring the home listing to this table is how a Reddit clone accidentally turns into Twitter.

Columns (3)

Columns of the user_follows table
ColumnTypeConstraintsDescription
follower_iduuidnot null, references users.id
followee_iduuidnot null, references users.id
created_attimestamptznot null

Indexes (1)

  • (followee_id)

Relationships

  • user_follows.follower_id references users.id
  • user_follows.followee_id references users.id