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)
| Column | Type | Constraints | Description |
|---|---|---|---|
| id | uuid | primary key | |
| subreddit_id | uuid | not null, references subreddits.id | |
| user_id | uuid | not null, references users.id | |
| muted_by | uuid | not null, references users.id | |
| reason | varchar(500) | ||
| muted_at | timestamptz | not null | |
| expires_at | timestamptz |
Indexes (1)
(subreddit_id, user_id)
Relationships
subreddit_mutes.subreddit_idreferencessubreddits.idsubreddit_mutes.user_idreferencesusers.idsubreddit_mutes.muted_byreferencesusers.id