report_reasons table

The report_reasons table in the Reddit Clone Database Schema schema has 6 columns, keyed by id, with 1 foreign key to subreddits. 1 column in reports references it.

Custom report reasons per community, sitting alongside the fixed report_reason enum. The enum is the site vocabulary that admins depend on; these rows are what a community writes for itself.

Columns (6)

Columns of the report_reasons table
ColumnTypeConstraintsDescription
iduuidprimary key
subreddit_iduuidreferences subreddits.id
codevarchar(60)not null
labelvarchar(200)not null
is_site_widebooleannot null
positionsmallintnot null

Indexes (1)

  • (subreddit_id, position)

Relationships