follows table

The follows table in the Social Media Database Schema schema has 4 columns, with 2 foreign keys to users.

Directed. Mutual following is two rows. status pending covers follow requests to a private account.

Columns (4)

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

Indexes (1)

  • (followee_id, status)

Relationships