MM-36743: adds last_root_post_at in channels table (#18366)

* MM-36743: adds last_root_post_at in channels table

Channel recency for CRT users should not count replies,
this commit solves that issue by adding a new column to the channels
table: LastRootPostAt.
With that new info CRT users can have recent channels to work as
expected.

* Adds the 'LastRootPostAt' to the SQL scripts

* Fixes tests

* Adds LastRootPostAt migration to v6.1

* Fixes index

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Kyriakos Z
2021-10-13 22:20:44 +03:00
коммит произвёл GitHub
родитель ff10bf1068
Коммит 4b85f9ee6a
6 изменённых файлов: 72 добавлений и 24 удалений

Просмотреть файл

@@ -47,6 +47,7 @@ type Channel struct {
Header string `json:"header"`
Purpose string `json:"purpose"`
LastPostAt int64 `json:"last_post_at"`
LastRootPostAt int64 `json:"last_root_post_at"`
TotalMsgCount int64 `json:"total_msg_count"`
ExtraUpdateAt int64 `json:"extra_update_at"`
CreatorId string `json:"creator_id"`