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>
This commit is contained in:
Kyriakos Z
2021-10-13 22:20:44 +03:00
committed by GitHub
parent ff10bf1068
commit 4b85f9ee6a
6 changed files with 72 additions and 24 deletions

View File

@@ -106,6 +106,7 @@ CREATE TABLE `Channels` (
`Header` text,
`Purpose` varchar(250) DEFAULT NULL,
`LastPostAt` bigint(20) DEFAULT NULL,
`LastRootPostAt` bigint(20) DEFAULT NULL,
`TotalMsgCount` bigint(20) DEFAULT NULL,
`ExtraUpdateAt` bigint(20) DEFAULT NULL,
`CreatorId` varchar(26) DEFAULT NULL,

View File

@@ -105,6 +105,7 @@ CREATE TABLE public.channels (
header character varying(1024),
purpose character varying(250),
lastpostat bigint,
lastrootpostat bigint,
totalmsgcount bigint,
extraupdateat bigint,
creatorid character varying(26),