Files
mattermost-mobile/app/database/schema/server/table_schemas/draft.ts
Kyriakos Z 6472ce1247 MM-49540: drafts migration adding metadata (#7240)
* MM-49540: drafts migration adding metadata

Adds a drafts table migration adding the column "metadata".
This column is going to be primarily used to store the draft's
metadata priority field.

* Addresses review comments
2023-03-30 12:42:52 +03:00

20 lines
587 B
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 {DRAFT} = MM_TABLES.SERVER;
export default tableSchema({
name: DRAFT,
columns: [
{name: 'channel_id', type: 'string', isIndexed: true},
{name: 'files', type: 'string'},
{name: 'message', type: 'string'},
{name: 'root_id', type: 'string', isIndexed: true},
{name: 'metadata', type: 'string', isOptional: true},
],
});