forked from Ivasoft/mattermost-mobile
* Add column last_fetched_at to MyChannel & Thread tables and the migration * Fix schema tests * Handle lastFetchAt, retrieve threads on init and properly observe thread unreads (#6436) * [Gekidou] Set lastFetchAt when fetching posts for a channel (#6437) * Set lastFetchAt when fetching posts for a channel * When resetting _preparedState set always to null * Revert changes in WS * Handle and set lastFetchedAt for MyChannel in iOS push notification * feedback review * iOS fallback to last post createAt if no lastFetchAt set * Handle lastFetchAt on Android push notifications * create storePostsForChannel local action * Fix iOS fallback to last post create_at Co-authored-by: Daniel Espino García <larkox@gmail.com>
74 lines
1.7 KiB
TypeScript
74 lines
1.7 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,
|
|
GroupSchema,
|
|
GroupChannelSchema,
|
|
GroupMembershipSchema,
|
|
GroupTeamSchema,
|
|
MyChannelSchema,
|
|
MyChannelSettingsSchema,
|
|
MyTeamSchema,
|
|
PostInThreadSchema,
|
|
PostSchema,
|
|
PostsInChannelSchema,
|
|
PreferenceSchema,
|
|
ReactionSchema,
|
|
RoleSchema,
|
|
SystemSchema,
|
|
TeamChannelHistorySchema,
|
|
TeamMembershipSchema,
|
|
TeamSchema,
|
|
TeamSearchHistorySchema,
|
|
ThreadSchema,
|
|
ThreadInTeamSchema,
|
|
ThreadParticipantSchema,
|
|
UserSchema,
|
|
} from './table_schemas';
|
|
|
|
export const serverSchema: AppSchema = appSchema({
|
|
version: 2,
|
|
tables: [
|
|
CategorySchema,
|
|
CategoryChannelSchema,
|
|
ChannelInfoSchema,
|
|
ChannelMembershipSchema,
|
|
ChannelSchema,
|
|
CustomEmojiSchema,
|
|
DraftSchema,
|
|
FileSchema,
|
|
GroupSchema,
|
|
GroupChannelSchema,
|
|
GroupMembershipSchema,
|
|
GroupTeamSchema,
|
|
MyChannelSchema,
|
|
MyChannelSettingsSchema,
|
|
MyTeamSchema,
|
|
PostInThreadSchema,
|
|
PostSchema,
|
|
PostsInChannelSchema,
|
|
PreferenceSchema,
|
|
ReactionSchema,
|
|
RoleSchema,
|
|
SystemSchema,
|
|
TeamChannelHistorySchema,
|
|
TeamMembershipSchema,
|
|
TeamSchema,
|
|
TeamSearchHistorySchema,
|
|
ThreadSchema,
|
|
ThreadInTeamSchema,
|
|
ThreadParticipantSchema,
|
|
UserSchema,
|
|
],
|
|
});
|