site_suspensions table

The site_suspensions table in the Reddit Clone Database Schema schema has 10 columns, keyed by id, with 3 foreign keys to users. 1 column in ban_appeals references it.

Site-wide sanction, deliberately a different table from subreddit_bans: they are issued by different people, appealed to different people, and have different consequences. is_shadowban means the account still posts and simply is not shown to anyone else, which cannot be modelled as a status alone because the user must not be told.

Columns (10)

Columns of the site_suspensions table
ColumnTypeConstraintsDescription
iduuidprimary key
user_iduuidnot null, references users.id
issued_byuuidreferences users.id
typesuspension_typenot null
reasonvarchar(1000)not null
is_shadowbanbooleannot null
starts_attimestamptznot null
expires_attimestamptz
lifted_attimestamptz
lifted_byuuidreferences users.id

Indexes (2)

  • (user_id, expires_at)
  • (type, starts_at)

Relationships