Fix default values for draftDate and EmojiSyncNeeded.createdAt fields

Co-authored-by: octoshrimpy <7097172+octoshrimpy@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-12-11 03:41:54 +00:00
parent d5f61c5e31
commit 72bc822bed
@@ -33,6 +33,9 @@ class AppRealmMigration : RealmMigration {
if (version < 12L) {
realm.schema.get("Conversation")
?.addField("draftDate", Long::class.java, FieldAttribute.REQUIRED)
?.transform { obj ->
obj.setLong("draftDate", 0L)
}
version = 12L
}
@@ -56,7 +59,9 @@ class AppRealmMigration : RealmMigration {
realm.schema.create("EmojiSyncNeeded")
.addField("createdAt", Long::class.java, FieldAttribute.REQUIRED)
realm.createObject("EmojiSyncNeeded")
realm.createObject("EmojiSyncNeeded").apply {
setLong("createdAt", System.currentTimeMillis())
}
version = 13L
}