message_reads table

The message_reads table in the Social Media Database Schema schema has 4 columns, with 3 foreign keys to conversations, users and messages.

A high-water mark per participant, not a row per message. Unread count is a range query above this point.

Columns (4)

Columns of the message_reads table
ColumnTypeConstraintsDescription
conversation_iduuidnot null, references conversations.id
user_iduuidnot null, references users.id
last_read_message_iduuidreferences messages.id
read_attimestamptznot null

Relationships