2019-09-16 20:26:32 +00:00
|
|
|
import { appSchema, tableSchema } from '@nozbe/watermelondb';
|
|
|
|
|
|
|
|
export default appSchema({
|
2021-07-05 18:21:15 +00:00
|
|
|
version: 11,
|
2019-09-16 20:26:32 +00:00
|
|
|
tables: [
|
|
|
|
tableSchema({
|
|
|
|
name: 'users',
|
|
|
|
columns: [
|
|
|
|
{ name: 'token', type: 'string', isOptional: true },
|
|
|
|
{ name: 'username', type: 'string', isOptional: true },
|
|
|
|
{ name: 'name', type: 'string', isOptional: true },
|
|
|
|
{ name: 'language', type: 'string', isOptional: true },
|
|
|
|
{ name: 'status', type: 'string', isOptional: true },
|
2020-03-30 20:19:01 +00:00
|
|
|
{ name: 'statusText', type: 'string', isOptional: true },
|
2020-08-25 20:04:18 +00:00
|
|
|
{ name: 'roles', type: 'string', isOptional: true },
|
2020-10-30 13:12:02 +00:00
|
|
|
{ name: 'login_email_password', type: 'boolean', isOptional: true },
|
2020-10-30 17:35:07 +00:00
|
|
|
{ name: 'show_message_in_main_thread', type: 'boolean', isOptional: true },
|
2021-07-05 18:21:15 +00:00
|
|
|
{ name: 'avatar_etag', type: 'string', isOptional: true },
|
|
|
|
{ name: 'is_from_webview', type: 'boolean', isOptional: true }
|
2019-09-16 20:26:32 +00:00
|
|
|
]
|
|
|
|
}),
|
|
|
|
tableSchema({
|
|
|
|
name: 'servers',
|
|
|
|
columns: [
|
|
|
|
{ name: 'name', type: 'string', isOptional: true },
|
|
|
|
{ name: 'icon_url', type: 'string', isOptional: true },
|
|
|
|
{ name: 'use_real_name', type: 'boolean', isOptional: true },
|
|
|
|
{ name: 'file_upload_media_type_white_list', type: 'string', isOptional: true },
|
|
|
|
{ name: 'file_upload_max_file_size', type: 'number', isOptional: true },
|
|
|
|
{ name: 'rooms_updated_at', type: 'number', isOptional: true },
|
2020-05-08 17:04:37 +00:00
|
|
|
{ name: 'version', type: 'string', isOptional: true },
|
|
|
|
{ name: 'last_local_authenticated_session', type: 'number', isOptional: true },
|
|
|
|
{ name: 'auto_lock', type: 'boolean', isOptional: true },
|
|
|
|
{ name: 'auto_lock_time', type: 'number', isOptional: true },
|
2020-07-30 17:25:52 +00:00
|
|
|
{ name: 'biometry', type: 'boolean', isOptional: true },
|
2020-08-21 13:38:50 +00:00
|
|
|
{ name: 'unique_id', type: 'string', isOptional: true },
|
2020-09-11 14:31:38 +00:00
|
|
|
{ name: 'enterprise_modules', type: 'string', isOptional: true },
|
|
|
|
{ name: 'e2e_enable', type: 'boolean', isOptional: true }
|
2019-09-16 20:26:32 +00:00
|
|
|
]
|
2020-09-11 17:10:16 +00:00
|
|
|
}),
|
|
|
|
tableSchema({
|
|
|
|
name: 'servers_history',
|
|
|
|
columns: [
|
|
|
|
{ name: 'url', type: 'string', isIndexed: true },
|
|
|
|
{ name: 'username', type: 'string', isOptional: true },
|
|
|
|
{ name: 'updated_at', type: 'number' }
|
|
|
|
]
|
2019-09-16 20:26:32 +00:00
|
|
|
})
|
|
|
|
]
|
|
|
|
});
|