Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Neil Alexander
element-android
Commits
dd0e5e2b
Unverified
Commit
dd0e5e2b
authored
May 10, 2021
by
Benoît Marty
Committed by
GitHub
May 10, 2021
Browse files
Merge pull request #3305 from vector-im/feature/bma/realm_update
Upgrade Realm to version 10.4.0
parents
fb0205e9
20f86a30
Changes
3
Hide whitespace changes
Inline
Side-by-side
CHANGES.md
View file @
dd0e5e2b
...
...
@@ -34,6 +34,7 @@ SDK API changes ⚠️:
Build 🧱:
-
Upgrade to gradle 7
-
https://github.com/Piasy/BigImageViewer is now hosted on mavenCentral()
-
Upgrade Realm to version 10.4.0
Test:
-
...
...
matrix-sdk-android/build.gradle
View file @
dd0e5e2b
...
...
@@ -6,13 +6,10 @@ apply plugin: 'realm-android'
buildscript
{
repositories
{
// mavenCentral()
//noinspection GrDeprecatedAPIUsage
jcenter
()
mavenCentral
()
}
dependencies
{
// Stick to this version until https://github.com/realm/realm-java/issues/7402 is fixed
classpath
"io.realm:realm-gradle-plugin:10.3.1"
classpath
"io.realm:realm-gradle-plugin:10.4.0"
}
}
...
...
matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/RealmSessionStoreMigration.kt
View file @
dd0e5e2b
...
...
@@ -144,10 +144,6 @@ class RealmSessionStoreMigration @Inject constructor() : RealmMigration {
Timber
.
d
(
"Step 7 -> 8"
)
val
editionOfEventSchema
=
realm
.
schema
.
create
(
"EditionOfEvent"
)
.
apply
{
// setEmbedded does not return `this`...
isEmbedded
=
true
}
.
addField
(
EditionOfEventFields
.
CONTENT
,
String
::
class
.
java
)
.
addField
(
EditionOfEventFields
.
EVENT_ID
,
String
::
class
.
java
)
.
setRequired
(
EditionOfEventFields
.
EVENT_ID
,
true
)
...
...
@@ -162,6 +158,10 @@ class RealmSessionStoreMigration @Inject constructor() : RealmMigration {
?.
removeField
(
"lastEditTs"
)
?.
removeField
(
"sourceLocalEchoEvents"
)
?.
addRealmListField
(
EditAggregatedSummaryEntityFields
.
EDITIONS
.
`$`
,
editionOfEventSchema
)
// This has to be done once a parent use the model as a child
// See https://github.com/realm/realm-java/issues/7402
editionOfEventSchema
.
isEmbedded
=
true
}
private
fun
migrateTo9
(
realm
:
DynamicRealm
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment