mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-07-04 19:34:35 -05:00
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:
@@ -59,7 +59,7 @@ class CategoryMutation {
|
||||
|
||||
CategoryMetaTable.deleteWhere { (CategoryMetaTable.ref eq categoryId) and (CategoryMetaTable.key eq key) }
|
||||
|
||||
val category= transaction {
|
||||
val category = transaction {
|
||||
CategoryType(CategoryTable.select { CategoryTable.id eq categoryId }.first())
|
||||
}
|
||||
|
||||
|
||||
@@ -170,7 +170,7 @@ class ChapterMutation {
|
||||
|
||||
ChapterMetaTable.deleteWhere { (ChapterMetaTable.ref eq chapterId) and (ChapterMetaTable.key eq key) }
|
||||
|
||||
val chapter= transaction {
|
||||
val chapter = transaction {
|
||||
ChapterType(ChapterTable.select { ChapterTable.id eq chapterId }.first())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user