fix db migration

This commit is contained in:
Valere 2022-03-16 15:55:00 +01:00
parent 9747eb2432
commit b1db6ca180
3 changed files with 12 additions and 1 deletions

View File

@ -42,6 +42,9 @@ class MigrateCryptoTo016(realm: DynamicRealm) : RealmMigrator(realm, 15) {
.addField(OutgoingKeyRequestEntityFields.REQUEST_STATE_STR, String::class.java) .addField(OutgoingKeyRequestEntityFields.REQUEST_STATE_STR, String::class.java)
.addIndex(OutgoingKeyRequestEntityFields.REQUEST_STATE_STR) .addIndex(OutgoingKeyRequestEntityFields.REQUEST_STATE_STR)
.addField(OutgoingKeyRequestEntityFields.REQUESTED_INFO_STR, String::class.java) .addField(OutgoingKeyRequestEntityFields.REQUESTED_INFO_STR, String::class.java)
.addField(OutgoingKeyRequestEntityFields.ROOM_ID, String::class.java)
.addIndex(OutgoingKeyRequestEntityFields.ROOM_ID)
.addField(OutgoingKeyRequestEntityFields.REQUESTED_INDEX, String::class.java)
.addField(OutgoingKeyRequestEntityFields.CREATION_TIME_STAMP, Long::class.java) .addField(OutgoingKeyRequestEntityFields.CREATION_TIME_STAMP, Long::class.java)
.setNullable(OutgoingKeyRequestEntityFields.CREATION_TIME_STAMP, true) .setNullable(OutgoingKeyRequestEntityFields.CREATION_TIME_STAMP, true)
@ -50,6 +53,7 @@ class MigrateCryptoTo016(realm: DynamicRealm) : RealmMigrator(realm, 15) {
.setNullable(AuditTrailEntityFields.AGE_LOCAL_TS, true) .setNullable(AuditTrailEntityFields.AGE_LOCAL_TS, true)
.addField(AuditTrailEntityFields.CONTENT_JSON, String::class.java) .addField(AuditTrailEntityFields.CONTENT_JSON, String::class.java)
.addField(AuditTrailEntityFields.TYPE, String::class.java) .addField(AuditTrailEntityFields.TYPE, String::class.java)
.addIndex(AuditTrailEntityFields.TYPE)
realm.schema.create("KeyRequestReplyEntity") realm.schema.create("KeyRequestReplyEntity")
.addField(KeyRequestReplyEntityFields.SENDER_ID, String::class.java) .addField(KeyRequestReplyEntityFields.SENDER_ID, String::class.java)

View File

@ -17,10 +17,11 @@
package org.matrix.android.sdk.internal.crypto.store.db.model package org.matrix.android.sdk.internal.crypto.store.db.model
import io.realm.RealmObject import io.realm.RealmObject
import io.realm.annotations.Index
internal open class AuditTrailEntity( internal open class AuditTrailEntity(
var ageLocalTs: Long? = null, var ageLocalTs: Long? = null,
var type: String? = null, @Index var type: String? = null,
var contentJson: String? = null var contentJson: String? = null
) : RealmObject() { ) : RealmObject() {
companion object companion object

View File

@ -88,6 +88,12 @@ class GossipingTrailPagedEpoxyController @Inject constructor(
TrailType.IncomingKeyRequest -> { TrailType.IncomingKeyRequest -> {
// no additional info // no additional info
} }
TrailType.IncomingKeyForward -> {
}
TrailType.Unknown -> {
}
} }
} }
}.toEpoxyCharSequence() }.toEpoxyCharSequence()