forked from Ivasoft/mattermost-mobile
Move config to its own database table (#6744)
* Move config to its own database table * Address feedback * Fix test * Revert minimum version related changes
This commit is contained in:
committed by
GitHub
parent
887565423c
commit
1aa4188f8e
@@ -4,9 +4,10 @@
|
||||
// NOTE : To implement migration, please follow this document
|
||||
// https://nozbe.github.io/WatermelonDB/Advanced/Migrations.html
|
||||
|
||||
import {schemaMigrations, addColumns} from '@nozbe/watermelondb/Schema/migrations';
|
||||
import {schemaMigrations, addColumns, createTable} from '@nozbe/watermelondb/Schema/migrations';
|
||||
|
||||
import {MM_TABLES} from '@constants/database';
|
||||
import {tableSchemaSpec as configSpec} from '@database/schema/server/table_schemas/config';
|
||||
|
||||
const {SERVER: {
|
||||
GROUP,
|
||||
@@ -16,6 +17,12 @@ const {SERVER: {
|
||||
}} = MM_TABLES;
|
||||
|
||||
export default schemaMigrations({migrations: [
|
||||
{
|
||||
toVersion: 5,
|
||||
steps: [
|
||||
createTable(configSpec),
|
||||
],
|
||||
},
|
||||
{
|
||||
toVersion: 4,
|
||||
steps: [
|
||||
|
||||
Reference in New Issue
Block a user