add MangaTable.lastFetchedAt and ChapterTable.chaptersLastFetchedAt (#431)

* Add lastFetchedAt and chaptersLastFetchedAt columns to manga

* Update lastFetchedAt columns when data are fetched from source

* Add age and chaptersAge fields to MangaDataClass

* Replace two migrations with single migration
This commit is contained in:
Valter Martinek
2022-10-30 17:46:23 +01:00
committed by GitHub
parent 23f0876c00
commit 0fa2834d25
6 changed files with 46 additions and 2 deletions

View File

@@ -100,6 +100,10 @@ object Chapter {
}
}
}
MangaTable.update({ MangaTable.id eq mangaId }) {
it[MangaTable.chaptersLastFetchedAt] = Instant.now().epochSecond
}
}
// clear any orphaned/duplicate chapters that are in the db but not in `chapterList`