|
@ -1,5 +1,6 @@ |
|
|
import {System} from '../entities/System'; |
|
|
import {System} from '../entities/System'; |
|
|
import uuid from 'uuid'; |
|
|
import 'react-native-get-random-values'; |
|
|
|
|
|
import { v4 as uuidv4 } from 'uuid'; |
|
|
|
|
|
|
|
|
export function migratev0(oldRealm, newRealm) { |
|
|
export function migratev0(oldRealm, newRealm) { |
|
|
//start with empty db
|
|
|
//start with empty db
|
|
@ -8,7 +9,7 @@ export function migratev0(oldRealm, newRealm) { |
|
|
export function migratev1(oldRealm, newRealm) { |
|
|
export function migratev1(oldRealm, newRealm) { |
|
|
if (oldRealm.schemaVersion === 0) { |
|
|
if (oldRealm.schemaVersion === 0) { |
|
|
newRealm.create(System.name, { |
|
|
newRealm.create(System.name, { |
|
|
id: uuid.v4(), |
|
|
id: uuidv4(), |
|
|
key: 'username', |
|
|
key: 'username', |
|
|
value: 'changeme' |
|
|
value: 'changeme' |
|
|
}); |
|
|
}); |
|
|