17
17
package org.matrix.android.sdk.internal.crypto.store.db.migration
18
18
19
19
import io.realm.DynamicRealm
20
+ import org.matrix.android.sdk.internal.extensions.safeRemove
20
21
import org.matrix.android.sdk.internal.util.database.RealmMigrator
21
22
22
23
internal class MigrateCryptoTo024 (realm : DynamicRealm ) : RealmMigrator(realm, 24 ) {
@@ -32,20 +33,20 @@ internal class MigrateCryptoTo024(realm: DynamicRealm) : RealmMigrator(realm, 24
32
33
get(" CryptoRoomEntity" )?.removeField(" outboundSessionInfo" )
33
34
34
35
// Warning: order is important, first remove classes that depends on others.
35
- remove (" UserEntity" )
36
- remove (" DeviceInfoEntity" )
37
- remove (" CrossSigningInfoEntity" )
38
- remove (" KeyInfoEntity" )
39
- remove (" TrustLevelEntity" )
40
- remove (" KeysBackupDataEntity" )
41
- remove (" OlmInboundGroupSessionEntity" )
42
- remove (" OlmSessionEntity" )
43
- remove (" AuditTrailEntity" )
44
- remove (" OutgoingKeyRequestEntity" )
45
- remove (" KeyRequestReplyEntity" )
46
- remove (" WithHeldSessionEntity" )
47
- remove (" SharedSessionEntity" )
48
- remove (" OutboundGroupSessionInfoEntity" )
36
+ safeRemove (" UserEntity" )
37
+ safeRemove (" DeviceInfoEntity" )
38
+ safeRemove (" CrossSigningInfoEntity" )
39
+ safeRemove (" KeyInfoEntity" )
40
+ safeRemove (" TrustLevelEntity" )
41
+ safeRemove (" KeysBackupDataEntity" )
42
+ safeRemove (" OlmInboundGroupSessionEntity" )
43
+ safeRemove (" OlmSessionEntity" )
44
+ safeRemove (" AuditTrailEntity" )
45
+ safeRemove (" OutgoingKeyRequestEntity" )
46
+ safeRemove (" KeyRequestReplyEntity" )
47
+ safeRemove (" WithHeldSessionEntity" )
48
+ safeRemove (" SharedSessionEntity" )
49
+ safeRemove (" OutboundGroupSessionInfoEntity" )
49
50
}
50
51
}
51
52
}
0 commit comments