add files count column in channel info table and db migration

This commit is contained in:
Ashish Dhama
2023-03-22 15:36:57 +05:30
parent ba523fab15
commit 763df58ef8
12 changed files with 35 additions and 3 deletions

View File

@@ -188,6 +188,7 @@ const ChannelHandler = <TBase extends Constructor<ServerDataOperatorBase>>(super
ci.member_count !== e.memberCount ||
ci.header !== e.header ||
ci.pinned_post_count !== e.pinnedPostCount ||
ci.files_count !== e.filesCount ||
ci.purpose !== e.purpose
) {
res.push(ci);

View File

@@ -103,6 +103,7 @@ describe('*** CHANNEL Prepare Records Test ***', () => {
header: 'channel info header',
member_count: 10,
pinned_post_count: 3,
files_count: 0,
purpose: 'sample channel ',
},
},

View File

@@ -101,6 +101,7 @@ export const transformChannelInfoRecord = ({action, database, value}: Transforme
channelInfo.header = raw.header ?? channelInfo.header ?? '';
channelInfo.memberCount = raw.member_count ?? channelInfo.memberCount ?? 0;
channelInfo.pinnedPostCount = raw.pinned_post_count ?? channelInfo.pinnedPostCount ?? 0;
channelInfo.filesCount = raw.files_count ?? channelInfo.filesCount ?? 0;
channelInfo.purpose = raw.purpose ?? channelInfo.purpose ?? '';
};