mirror of
https://github.com/mihonapp/mihon.git
synced 2025-06-25 18:47:51 +02:00
Database changes to support library syncing (#9683)
* feat: added migrations. * feat: create triggers, account for new installs. * feat: update mappers to include the new field. * feat: update backupManga and backupChapter. Include the new fields to be backed up as well. * feat: add sql query to fetch all manga with `last_favorited_at` field. * feat: version bump. * chore: revert and refactor. * chore: forgot to lower case the field name. * chore: added getAllManga query as well renamed `fetchMangaWithLastFavorite` to `getMangasWithFavoriteTimestamp` * chore: oops that's not meant to be there. * feat: back fill and set last_modified_at to not null. * chore: remove redundant triggers. * fix: build error, accidentally removed insert. * fix: build error, accidentally removed insert. * refactor: review pointer, make fields not null.
This commit is contained in:
@ -13,6 +13,7 @@ data class Chapter(
|
||||
val dateUpload: Long,
|
||||
val chapterNumber: Float,
|
||||
val scanlator: String?,
|
||||
val lastModifiedAt: Long,
|
||||
) {
|
||||
val isRecognizedNumber: Boolean
|
||||
get() = chapterNumber >= 0f
|
||||
@ -31,6 +32,7 @@ data class Chapter(
|
||||
dateUpload = -1,
|
||||
chapterNumber = -1f,
|
||||
scanlator = null,
|
||||
lastModifiedAt = 0,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -24,6 +24,8 @@ data class Manga(
|
||||
val thumbnailUrl: String?,
|
||||
val updateStrategy: UpdateStrategy,
|
||||
val initialized: Boolean,
|
||||
val lastModifiedAt: Long,
|
||||
val favoriteModifiedAt: Long?,
|
||||
) : Serializable {
|
||||
|
||||
val sorting: Long
|
||||
@ -109,6 +111,8 @@ data class Manga(
|
||||
thumbnailUrl = null,
|
||||
updateStrategy = UpdateStrategy.ALWAYS_UPDATE,
|
||||
initialized = false,
|
||||
lastModifiedAt = 0L,
|
||||
favoriteModifiedAt = 0L,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user