mattermost-mobile/app/database/server/schema/index.ts
Avinash Lingaloo 89d4cf235f
MM_30476 [v2] Section 'Team' of the Server schema (#5071)
* MM_30476 : Added all isolated tables from the server schema

* MM_30476 : Updated 'test' script in package.json

* MM_30476 : ADDED team section of the server schema

* MM_30476 : Apply suggestions from code review

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>

* MM_30476 : Apply suggestions from code review

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>

* MM_30476 : Updates to field name and description

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
Co-authored-by: Hossein <hahmadia@users.noreply.github.com>

* MM_30476 : Updated my_team and team_search_history description

* MM_30476 : Prefixing boolean fields with 'is'

* MM_30476 : Updated channel.d.ts

Co-authored-by: Hossein <hahmadia@users.noreply.github.com>
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>

* MM_30476 : ADDED lazy queries to TeamMembership

Two methods that will retrieve all users in a team and all the teams that a user is part of

* MM_30476 : Updated descriptions for the associations

* MM_30476 : Updated tests as server schema was updated

* MM_30476 : Updated Team to have a 1:1 relationship with TeamChannelHistory

* MM_30476 : Updated team_membership and user

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
Co-authored-by: Hossein <hahmadia@users.noreply.github.com>
2021-01-11 21:54:33 +04:00

33 lines
792 B
TypeScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {AppSchema, appSchema} from '@nozbe/watermelondb';
import {
CustomEmojiSchema,
MyTeamSchema,
RoleSchema,
SlashCommandSchema,
SystemSchema,
TeamChannelHistorySchema,
TeamMembershipSchema,
TeamSchema,
TeamSearchHistorySchema,
TermsOfServiceSchema,
} from './table_schemas';
export const serverSchema: AppSchema = appSchema({
version: 1,
tables: [
CustomEmojiSchema,
MyTeamSchema,
RoleSchema,
SlashCommandSchema,
SystemSchema,
TeamChannelHistorySchema,
TeamMembershipSchema,
TeamSchema,
TeamSearchHistorySchema,
TermsOfServiceSchema,
],
});