removal_reasons table

The removal_reasons table in the Reddit Clone Database Schema schema has 5 columns, keyed by id, with 1 foreign key to subreddits. 2 columns in posts and comments reference it.

Canned removal messages. posts.removal_reason_id points here rather than storing free text, so a community can fix the wording of a rule explanation once and every past removal reads correctly.

Columns (5)

Columns of the removal_reasons table
ColumnTypeConstraintsDescription
iduuidprimary key
subreddit_iduuidnot null, references subreddits.id
titlevarchar(200)not null
message_mdvarchar(2000)not null
positionsmallintnot null

Indexes (1)

  • (subreddit_id, position)

Relationships