mirror of
https://github.com/mattermost/mattermost-mobile.git
synced 2026-11-04 18:08:54 +00:00
* server DB migration to add persistence flag needed by ephemeral mode feature When Mobile Ephemeral Mode is enabled by an admin, database persistence using SQLite for a particular server is not always the case. If Zero Persistence mode is setup by an admin, the app won't persist anything on a disk backed database. If Offline wiping is setup for a particular server then, when the app is considered to be offline after a certain period of time the server databased is completely wiped. To accommodate these two local persistence new modes and make the UI react accordingly, a new flag is now added to the app database (since server database may not exist) with different enumerated values depending on server mandated settings. * Update types/database/models/app/servers.ts Co-authored-by: Alejandro García Montoro <alejandro.garciamontoro@gmail.com> * adds test for updating the persistence flag --------- Co-authored-by: Alejandro García Montoro <alejandro.garciamontoro@gmail.com>
32 lines
733 B
Markdown
32 lines
733 B
Markdown
# App Database - Schema Version 2
|
|
# Please bump the version by 1, any time the schema changes.
|
|
# Also, include the migration plan under app/database/migration/server,
|
|
# update all models, relationships and types.
|
|
# Lastly, export all PNGs, SVGs, etc under the source project (./docs/database)
|
|
# If you have any question/queries that you would like to clarify, please reach out to the Mobile Platform Team.
|
|
|
|
|
|
Info
|
|
-
|
|
id PK string # auto-generated
|
|
build_number string
|
|
created_at number
|
|
version_number string
|
|
|
|
|
|
Global
|
|
-
|
|
id PK string # GLOBAL_IDENTIFIERS
|
|
value string
|
|
|
|
|
|
Servers
|
|
-
|
|
id PK string # auto-generated
|
|
db_path string
|
|
display_name string
|
|
url string INDEX
|
|
last_active_at number INDEX
|
|
identifier string INDEX
|
|
persistence_flag string
|