Skip to content

Commit 06abbf4

Browse files
committed
Fix db migration issue
1 parent 17eac40 commit 06abbf4

File tree

3 files changed

+8
-11
lines changed

3 files changed

+8
-11
lines changed

xkcd/objectbox-models/default.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@
2626
},
2727
{
2828
"id": "5:7047913805660868881",
29-
"name": "title"
29+
"name": "_title"
3030
},
3131
{
3232
"id": "6:6826620300502689902",
3333
"name": "img"
3434
},
3535
{
3636
"id": "7:9035471003790175147",
37-
"name": "alt"
37+
"name": "_alt"
3838
},
3939
{
4040
"id": "10:4122283148199933474",

xkcd/objectbox-models/default.json.bak

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
},
3535
{
3636
"id": "7:9035471003790175147",
37-
"name": "alt"
37+
"name": "_alt"
3838
},
3939
{
4040
"id": "10:4122283148199933474",
@@ -51,10 +51,6 @@
5151
{
5252
"id": "14:9125666023352709174",
5353
"name": "hasThumbed"
54-
},
55-
{
56-
"id": "15:4531149468420226174",
57-
"name": "thumbCount"
5854
}
5955
],
6056
"relations": []
@@ -153,7 +149,8 @@
153149
7914150310476867013,
154150
4606230756309457134,
155151
6782987198030462947,
156-
5092884225282829685
152+
5092884225282829685,
153+
4531149468420226174
157154
],
158155
"retiredRelationUids": [],
159156
"version": 1

xkcd/src/main/java/xyz/jienan/xkcd/model/XkcdPic.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import androidx.core.text.HtmlCompat
55
import com.google.gson.annotations.SerializedName
66
import io.objectbox.annotation.Entity
77
import io.objectbox.annotation.Id
8-
import io.objectbox.annotation.NameInDb
8+
import io.objectbox.annotation.Uid
99
import xyz.jienan.xkcd.model.util.XkcdSideloadUtils
1010
import java.io.Serializable
1111

@@ -20,7 +20,7 @@ data class XkcdPic constructor(
2020
val day: String = "",
2121
@Id(assignable = true)
2222
var num: Long = 0L,
23-
@NameInDb("alt")
23+
@Uid(9035471003790175147L)
2424
@SerializedName("alt")
2525
val _alt: String = "",
2626
var width: Int = 0,
@@ -29,7 +29,7 @@ data class XkcdPic constructor(
2929
var hasThumbed: Boolean = false,
3030
@io.objectbox.annotation.Transient
3131
val thumbCount: Long = 0L,
32-
@NameInDb("title")
32+
@Uid(7047913805660868881L)
3333
@SerializedName("title")
3434
val _title: String = "",
3535
var img: String = "",

0 commit comments

Comments
 (0)