Fix / missing primary key for migration

This commit is contained in:
Valere 2020-04-29 16:35:50 +02:00
parent dcfd9ee7a7
commit 7b46c49ded
1 changed files with 1 additions and 0 deletions

View File

@ -219,6 +219,7 @@ internal class RealmCryptoStoreMigration @Inject constructor(private val crossSi
private fun migrateTo5(realm: DynamicRealm) {
realm.schema.create("MyDeviceLastSeenInfoEntity")
.addField(MyDeviceLastSeenInfoEntityFields.DEVICE_ID, String::class.java)
.addPrimaryKey(MyDeviceLastSeenInfoEntityFields.DEVICE_ID)
.addField(MyDeviceLastSeenInfoEntityFields.DISPLAY_NAME, String::class.java)
.addField(MyDeviceLastSeenInfoEntityFields.LAST_SEEN_IP, String::class.java)
.addField(MyDeviceLastSeenInfoEntityFields.LAST_SEEN_TS, Long::class.java)