Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Database structure

...

New additions are colored green.

Table

Column

Definition

Channels

TotalMsgCountRoot

Total number of root messages

ChannelMembers

MsgCountRoot

Number of seen root messages

MentionCountRoot

Number of unread mentions in root messages

Threads

PostId

Id of the root post

ChannelId

ReplyCount

Number or reply posts in this thread

LastReplyAt

Timestamp of the last reply

Participants

json array of all thread member IDs

ThreadMemberships

PostId

Id of the root post

UserId

Id of the user

Following

Is the thread followed

UnreadMentions

Number of unread mentions for this user in the thread

LastViewed

Timestamp of when the thread was last viewed

LastUpdated

Timestamp of the last change to the thread (follow state, mentions, etc)

...

Additional ‘following’ boolean will be added

Related PRs

https://github.com/mattermost/mattermost-server/pull/15878
https://github.com/mattermost/mattermost-server/pull/17390
https://github.com/mattermost/mattermost-server/pull/17343
https://github.com/mattermost/mattermost-server/pull/17150
https://github.com/mattermost/mattermost-server/pull/17099
https://github.com/mattermost/mattermost-server/pull/17093
https://github.com/mattermost/mattermost-server/pull/17064
https://github.com/mattermost/mattermost-server/pull/16909
https://github.com/mattermost/mattermost-server/pull/16659
https://github.com/mattermost/mattermost-server/pull/16503
https://github.com/mattermost/mattermost-server/pull/16407
https://github.com/mattermost/mattermost-server/pull/16304
https://github.com/mattermost/mattermost-server/pull/16091