Files
mattermost-mobile/app/constants/database.ts
Avinash Lingaloo a505bd5e11 MM_30476 : ADDED Schema Managers
* The migration array will hold all the migration steps.

*  The initial app release (e.g. v2 )will have an empty array and subsequent releases  (e.g.  v2.1 ) will have the steps listed in that array.

* On initialization, the database will perform the migration to accomodate for new columns/tables creation and while it will conserve the mobile phone's data, it will also make it conform to this new schema.

* If a migration fails, the migration process will rollback any changes.  This migration will be thoroughly tested in development before pushing it live.
2020-12-01 16:43:23 +04:00

53 lines
1.4 KiB
TypeScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import keyMirror from '@utils/key_mirror';
export const MM_TABLES = {
DEFAULT: {
APP: 'app',
GLOBAL: 'global',
SERVERS: 'servers',
},
SERVER: {
CHANNEL: 'Channel',
CHANNEL_INFO: 'ChannelInfo',
CHANNEL_MEMBERSHIP: 'ChannelMembership',
CUSTOM_EMOJI: 'CustomEmoji',
DRAFT: 'Draft',
FILE: 'File',
GROUP: 'Group',
GROUPS_IN_CHANNEL: 'GroupsInChannel',
GROUPS_IN_TEAM: 'GroupsInTeam',
GROUP_MEMBERSHIP: 'GroupMembership',
MY_CHANNEL: 'MyChannel',
MY_CHANNEL_SETTINGS: 'MyChannelSettings',
MY_TEAM: 'MyTeam',
POST: 'Post',
POSTS_IN_CHANNEL: 'PostsInChannel',
POSTS_IN_THREAD: 'PostsInThread',
POST_METADATA: 'PostMetadata',
PREFERENCE: 'Preference',
REACTION: 'Reaction',
ROLE: 'Role',
SLASH_COMMAND: 'SlashCommand',
SYSTEM: 'System',
TEAM: 'Team',
TEAM_CHANNEL_HISTORY: 'TeamChannelHistory',
TEAM_MEMBERSHIP: 'TeamMembership',
TEAM_SEARCH_HISTORY: 'TeamSearchHistory',
TERMS_OF_SERVICE: 'TermsOfService',
USER: 'User',
},
};
export const DB_NAME = keyMirror({
DEFAULT_DATABASE: null,
SERVER_DATABASE: null,
});
export default {
DB_NAME,
MM_TABLES,
};