removed SlashCommands from the Server database schema (#6116)

This commit is contained in:
Avinash Lingaloo
2022-04-01 19:23:57 +04:00
committed by GitHub
parent b7d04afa21
commit 764e08e25d
17 changed files with 6 additions and 281 deletions

View File

@@ -21,7 +21,6 @@ import {
PreferenceSchema,
ReactionSchema,
RoleSchema,
SlashCommandSchema,
SystemSchema,
TeamChannelHistorySchema,
TeamMembershipSchema,
@@ -54,7 +53,6 @@ export const serverSchema: AppSchema = appSchema({
PreferenceSchema,
ReactionSchema,
RoleSchema,
SlashCommandSchema,
SystemSchema,
TeamChannelHistorySchema,
TeamMembershipSchema,

View File

@@ -18,7 +18,6 @@ export {default as PostsInChannelSchema} from './posts_in_channel';
export {default as PreferenceSchema} from './preference';
export {default as ReactionSchema} from './reaction';
export {default as RoleSchema} from './role';
export {default as SlashCommandSchema} from './slash_command';
export {default as SystemSchema} from './system';
export {default as TeamChannelHistorySchema} from './team_channel_history';
export {default as TeamMembershipSchema} from './team_membership';

View File

@@ -1,23 +0,0 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {tableSchema} from '@nozbe/watermelondb';
import {MM_TABLES} from '@constants/database';
const {SLASH_COMMAND} = MM_TABLES.SERVER;
export default tableSchema({
name: SLASH_COMMAND,
columns: [
{name: 'is_auto_complete', type: 'boolean'},
{name: 'description', type: 'string'},
{name: 'display_name', type: 'string'},
{name: 'hint', type: 'string'},
{name: 'method', type: 'string'},
{name: 'team_id', type: 'string', isIndexed: true},
{name: 'token', type: 'string'},
{name: 'trigger', type: 'string'},
{name: 'update_at', type: 'number'},
],
});

View File

@@ -25,7 +25,6 @@ const {
PREFERENCE,
REACTION,
ROLE,
SLASH_COMMAND,
SYSTEM,
TEAM,
TEAM_CHANNEL_HISTORY,
@@ -345,32 +344,6 @@ describe('*** Test schema for SERVER database ***', () => {
{name: 'permissions', type: 'string'},
],
},
[SLASH_COMMAND]: {
name: SLASH_COMMAND,
unsafeSql: undefined,
columns: {
is_auto_complete: {name: 'is_auto_complete', type: 'boolean'},
description: {name: 'description', type: 'string'},
display_name: {name: 'display_name', type: 'string'},
hint: {name: 'hint', type: 'string'},
method: {name: 'method', type: 'string'},
team_id: {name: 'team_id', type: 'string', isIndexed: true},
token: {name: 'token', type: 'string'},
trigger: {name: 'trigger', type: 'string'},
update_at: {name: 'update_at', type: 'number'},
},
columnArray: [
{name: 'is_auto_complete', type: 'boolean'},
{name: 'description', type: 'string'},
{name: 'display_name', type: 'string'},
{name: 'hint', type: 'string'},
{name: 'method', type: 'string'},
{name: 'team_id', type: 'string', isIndexed: true},
{name: 'token', type: 'string'},
{name: 'trigger', type: 'string'},
{name: 'update_at', type: 'number'},
],
},
[SYSTEM]: {
name: SYSTEM,
unsafeSql: undefined,