From 8cbc6a90d0b2fecbce66fa3f5f0d753dade456d8 Mon Sep 17 00:00:00 2001 From: ForteScarlet Date: Sun, 31 Mar 2024 19:58:55 +0800 Subject: [PATCH] fix database --- src/main/kotlin/Main.kt | 1 + src/main/kotlin/database/entity/BonusRecord.kt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/Main.kt b/src/main/kotlin/Main.kt index f5e4ca5..46e16a6 100644 --- a/src/main/kotlin/Main.kt +++ b/src/main/kotlin/Main.kt @@ -110,6 +110,7 @@ fun main() { enabled = !winState.isMinimized, onCloseRequest = { exitApplication() + databaseOp.close() } ) { MaterialTheme( diff --git a/src/main/kotlin/database/entity/BonusRecord.kt b/src/main/kotlin/database/entity/BonusRecord.kt index d5b3b61..7ce2522 100644 --- a/src/main/kotlin/database/entity/BonusRecord.kt +++ b/src/main/kotlin/database/entity/BonusRecord.kt @@ -37,7 +37,7 @@ object BonusRecords : BaseIntIdTable() { /** * 备注 */ - val remark = varchar("remark", 500).clientDefault { "" } + val remark = varchar("remark", 500).default("") } class BonusRecord(id: EntityID) : BaseIntEntity(id, BonusRecords) {