Improve database column references and default category handling (#563)

* Improve default category handling and add cascade to references where possible

* Minor fix for default category

* Make the default category always first in the normalization
This commit is contained in:
Mitchell Syer
2023-05-27 20:41:27 -04:00
committed by GitHub
parent 241abc3956
commit 6a7efafd9f
13 changed files with 76 additions and 31 deletions

View File

@@ -31,7 +31,6 @@ object Library {
MangaTable.update({ MangaTable.id eq manga.id }) {
it[inLibrary] = true
it[inLibraryAt] = Instant.now().epochSecond
it[defaultCategory] = defaultCategories.isEmpty() && existingCategories.isEmpty()
}
if (existingCategories.isEmpty()) {