modmail_messages table

The modmail_messages table in the Reddit Clone Database Schema schema has 7 columns, keyed by id, with 2 foreign keys to modmail_conversations and users.

is_private_note is a mod-only annotation inside an otherwise visible thread, and is_author_hidden is how a team replies as the subreddit rather than as a named person. Both are visibility rules that must live on the message, not the conversation.

Columns (7)

Columns of the modmail_messages table
ColumnTypeConstraintsDescription
iduuidprimary key
conversation_iduuidnot null, references modmail_conversations.id
author_iduuidreferences users.id
body_mdtextnot null
is_private_notebooleannot null
is_author_hiddenbooleannot null
created_attimestamptznot null

Indexes (1)

  • (conversation_id, created_at)

Relationships