* Adds threads in team database table and handlers DM/GM channels have no team ID. This makes it troublesome to paginate threads in a team. The issue is that whenever a DM/GM thread is fetched from pagination it will be added in all teams in that server, potentially creating gaps in between threads for those teams. This PR inserts a new table in the DB ThreadsInTeam which will hold references of threads loaded in which server. Thread lists then would have to rely on that table to show threads. Co-authored-by: Elias Nahum <nahumhbl@gmail.com> Co-authored-by: Avinash Lingaloo <avinashlng1080@gmail.com>
69 lines
1.6 KiB
TypeScript
69 lines
1.6 KiB
TypeScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
import {AppSchema, appSchema} from '@nozbe/watermelondb';
|
|
|
|
import {
|
|
CategorySchema,
|
|
CategoryChannelSchema,
|
|
ChannelInfoSchema,
|
|
ChannelMembershipSchema,
|
|
ChannelSchema,
|
|
CustomEmojiSchema,
|
|
DraftSchema,
|
|
FileSchema,
|
|
MyChannelSchema,
|
|
MyChannelSettingsSchema,
|
|
MyTeamSchema,
|
|
PostInThreadSchema,
|
|
PostSchema,
|
|
PostsInChannelSchema,
|
|
PreferenceSchema,
|
|
ReactionSchema,
|
|
RoleSchema,
|
|
SlashCommandSchema,
|
|
SystemSchema,
|
|
TeamChannelHistorySchema,
|
|
TeamMembershipSchema,
|
|
TeamSchema,
|
|
TeamSearchHistorySchema,
|
|
TermsOfServiceSchema,
|
|
ThreadSchema,
|
|
ThreadInTeamSchema,
|
|
ThreadParticipantSchema,
|
|
UserSchema,
|
|
} from './table_schemas';
|
|
|
|
export const serverSchema: AppSchema = appSchema({
|
|
version: 1,
|
|
tables: [
|
|
CategorySchema,
|
|
CategoryChannelSchema,
|
|
ChannelInfoSchema,
|
|
ChannelMembershipSchema,
|
|
ChannelSchema,
|
|
CustomEmojiSchema,
|
|
DraftSchema,
|
|
FileSchema,
|
|
MyChannelSchema,
|
|
MyChannelSettingsSchema,
|
|
MyTeamSchema,
|
|
PostInThreadSchema,
|
|
PostSchema,
|
|
PostsInChannelSchema,
|
|
PreferenceSchema,
|
|
ReactionSchema,
|
|
RoleSchema,
|
|
SlashCommandSchema,
|
|
SystemSchema,
|
|
TeamChannelHistorySchema,
|
|
TeamMembershipSchema,
|
|
TeamSchema,
|
|
TeamSearchHistorySchema,
|
|
TermsOfServiceSchema,
|
|
ThreadSchema,
|
|
ThreadInTeamSchema,
|
|
ThreadParticipantSchema,
|
|
UserSchema,
|
|
],
|
|
});
|