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)
| Column | Type | Constraints | Description |
|---|---|---|---|
| id | uuid | primary key | |
| subreddit_id | uuid | not null, references subreddits.id | |
| title | varchar(200) | not null | |
| message_md | varchar(2000) | not null | |
| position | smallint | not null |
Indexes (1)
(subreddit_id, position)
Relationships
removal_reasons.subreddit_idreferencessubreddits.idposts.removal_reason_idreferencesremoval_reasonscomments.removal_reason_idreferencesremoval_reasons