* started with the diagrams * removed redundant tables next step: 1. reconstruct id ( local id vs server id ) 2. annotate fields with examples 3. recreate relationship * work in progress * work in progress * fix association * update postsInChannel * removed SlashCommands from the Server database schema * added missing associations in the models and updated docs/database * exported server database * update test * code corrections following review * update relationship * update docs * removed cyclic relationship * Revert "removed cyclic relationship" This reverts commit 4d784efb815c0430aa3f7cc433ac4125898d2621. * removed isOptional from Draft * linked myChannelSettings to myChannel instead of Channel * update diagrams * store null instead of empty string * update thread association Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
33 lines
1.2 KiB
TypeScript
33 lines
1.2 KiB
TypeScript
// 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 {USER} = MM_TABLES.SERVER;
|
|
|
|
export default tableSchema({
|
|
name: USER,
|
|
columns: [
|
|
{name: 'auth_service', type: 'string'},
|
|
{name: 'delete_at', type: 'number'},
|
|
{name: 'email', type: 'string'},
|
|
{name: 'first_name', type: 'string'},
|
|
{name: 'is_bot', type: 'boolean'},
|
|
{name: 'is_guest', type: 'boolean'},
|
|
{name: 'last_name', type: 'string'},
|
|
{name: 'last_picture_update', type: 'number'},
|
|
{name: 'locale', type: 'string'},
|
|
{name: 'nickname', type: 'string'},
|
|
{name: 'notify_props', type: 'string'},
|
|
{name: 'position', type: 'string'},
|
|
{name: 'props', type: 'string'},
|
|
{name: 'remote_id', type: 'string', isOptional: true},
|
|
{name: 'roles', type: 'string'},
|
|
{name: 'status', type: 'string'},
|
|
{name: 'timezone', type: 'string'},
|
|
{name: 'update_at', type: 'number'},
|
|
{name: 'username', type: 'string'},
|
|
],
|
|
});
|