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

@@ -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())
}