subreddit_mutes table

The subreddit_mutes table in the Reddit Clone Database Schema schema has 7 columns, keyed by id, with 3 foreign keys to subreddits and users.

A mute stops modmail only and leaves posting alone, which is why it cannot be a flag on the ban row. Conflating the two is how mod teams accidentally silence someone they only meant to stop arguing with.

Columns (7)

Columns of the subreddit_mutes table
ColumnTypeConstraintsDescription
iduuidprimary key
subreddit_iduuidnot null, references subreddits.id
user_iduuidnot null, references users.id
muted_byuuidnot null, references users.id
reasonvarchar(500)
muted_attimestamptznot null
expires_attimestamptz

Indexes (1)

  • (subreddit_id, user_id)

Relationships