2020-03-30 20:19:01 +00:00
|
|
|
import { schemaMigrations, addColumns } from '@nozbe/watermelondb/Schema/migrations';
|
|
|
|
|
|
|
|
export default schemaMigrations({
|
|
|
|
migrations: [
|
|
|
|
{
|
|
|
|
toVersion: 3,
|
|
|
|
steps: [
|
|
|
|
addColumns({
|
|
|
|
table: 'users',
|
|
|
|
columns: [
|
|
|
|
{ name: 'statusText', type: 'string', isOptional: true }
|
|
|
|
]
|
|
|
|
})
|
|
|
|
]
|
2020-05-08 17:04:37 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
toVersion: 4,
|
|
|
|
steps: [
|
|
|
|
addColumns({
|
|
|
|
table: 'servers',
|
|
|
|
columns: [
|
|
|
|
{ name: 'last_local_authenticated_session', type: 'number', isOptional: true },
|
|
|
|
{ name: 'auto_lock', type: 'boolean', isOptional: true },
|
|
|
|
{ name: 'auto_lock_time', type: 'number', isOptional: true },
|
|
|
|
{ name: 'biometry', type: 'boolean', isOptional: true }
|
|
|
|
]
|
|
|
|
})
|
|
|
|
]
|
2020-07-30 17:25:52 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
toVersion: 5,
|
|
|
|
steps: [
|
|
|
|
addColumns({
|
|
|
|
table: 'servers',
|
|
|
|
columns: [
|
|
|
|
{ name: 'unique_id', type: 'string', isOptional: true }
|
|
|
|
]
|
|
|
|
})
|
|
|
|
]
|
2020-08-21 13:38:50 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
toVersion: 6,
|
|
|
|
steps: [
|
|
|
|
addColumns({
|
|
|
|
table: 'servers',
|
|
|
|
columns: [
|
|
|
|
{ name: 'enterprise_modules', type: 'string', isOptional: true }
|
|
|
|
]
|
|
|
|
})
|
|
|
|
]
|
2020-03-30 20:19:01 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
});
|