conversation_participants table

The conversation_participants table in the Social Media Database Schema schema has 6 columns, with 2 foreign keys to conversations and users.

left_at null means currently in the thread. Keeping the row preserves who saw what before they left.

Columns (6)

Columns of the conversation_participants table
ColumnTypeConstraintsDescription
conversation_iduuidnot null, references conversations.id
user_iduuidnot null, references users.id
joined_attimestamptznot null
left_attimestamptz
is_adminbooleannot null
muted_untiltimestamptz

Indexes (1)

  • (user_id, left_at)

Relationships

  • conversation_participants.conversation_id references conversations.id
  • conversation_participants.user_id references users.id