File tree 2 files changed +32
-1
lines changed
matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database
2 files changed +32
-1
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ import org.matrix.android.sdk.internal.database.migration.MigrateSessionTo040
60
60
import org.matrix.android.sdk.internal.database.migration.MigrateSessionTo041
61
61
import org.matrix.android.sdk.internal.database.migration.MigrateSessionTo042
62
62
import org.matrix.android.sdk.internal.database.migration.MigrateSessionTo043
63
+ import org.matrix.android.sdk.internal.database.migration.MigrateSessionTo044
63
64
import org.matrix.android.sdk.internal.util.Normalizer
64
65
import org.matrix.android.sdk.internal.util.database.MatrixRealmMigration
65
66
import javax.inject.Inject
@@ -68,7 +69,7 @@ internal class RealmSessionStoreMigration @Inject constructor(
68
69
private val normalizer : Normalizer
69
70
) : MatrixRealmMigration(
70
71
dbName = " Session" ,
71
- schemaVersion = 43L ,
72
+ schemaVersion = 44L ,
72
73
) {
73
74
/* *
74
75
* Forces all RealmSessionStoreMigration instances to be equal.
@@ -121,5 +122,6 @@ internal class RealmSessionStoreMigration @Inject constructor(
121
122
if (oldVersion < 41 ) MigrateSessionTo041 (realm).perform()
122
123
if (oldVersion < 42 ) MigrateSessionTo042 (realm).perform()
123
124
if (oldVersion < 43 ) MigrateSessionTo043 (realm).perform()
125
+ if (oldVersion < 44 ) MigrateSessionTo044 (realm).perform()
124
126
}
125
127
}
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright (c) 2022 The Matrix.org Foundation C.I.C.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ package org.matrix.android.sdk.internal.database.migration
18
+
19
+ import io.realm.DynamicRealm
20
+ import org.matrix.android.sdk.internal.database.model.ReadReceiptEntityFields
21
+ import org.matrix.android.sdk.internal.util.database.RealmMigrator
22
+
23
+ internal class MigrateSessionTo044 (realm : DynamicRealm ) : RealmMigrator(realm, 44 ) {
24
+
25
+ override fun doMigrate (realm : DynamicRealm ) {
26
+ realm.schema.get(" ReadReceiptEntity" )
27
+ ?.addField(ReadReceiptEntityFields .THREAD_ID , String ::class .java)
28
+ }
29
+ }
You can’t perform that action at this time.
0 commit comments