From 00230568b67df4db2d8d5ba4ee02b2986a9dcdc1 Mon Sep 17 00:00:00 2001 From: Peter Motzko Date: Thu, 11 May 2023 14:49:44 +0200 Subject: [PATCH] feat(persistence): add console logger to db init transaction (commented out, but useful for debugging) --- .../managedidentitywallets/plugins/Persistence.kt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/org/eclipse/tractusx/managedidentitywallets/plugins/Persistence.kt b/src/main/kotlin/org/eclipse/tractusx/managedidentitywallets/plugins/Persistence.kt index 261064759..be14d63b9 100644 --- a/src/main/kotlin/org/eclipse/tractusx/managedidentitywallets/plugins/Persistence.kt +++ b/src/main/kotlin/org/eclipse/tractusx/managedidentitywallets/plugins/Persistence.kt @@ -20,7 +20,9 @@ package org.eclipse.tractusx.managedidentitywallets.plugins import io.ktor.application.* -import org.eclipse.tractusx.managedidentitywallets.persistence.entities.* +import org.eclipse.tractusx.managedidentitywallets.persistence.entities.KeyReferences +import org.eclipse.tractusx.managedidentitywallets.persistence.entities.VerifiableCredentials +import org.eclipse.tractusx.managedidentitywallets.persistence.entities.Wallets import org.jetbrains.exposed.sql.Database import org.jetbrains.exposed.sql.SchemaUtils import org.jetbrains.exposed.sql.transactions.transaction @@ -30,6 +32,8 @@ fun Application.configurePersistence() { val jdbcDriver = environment.config.property("db.jdbcDriver").getString() Database.connect(jdbcUrl, driver = jdbcDriver) transaction { + // addLogger(StdOutSqlLogger) + // Create missing tables SchemaUtils.createMissingTablesAndColumns( Wallets, @@ -37,5 +41,5 @@ fun Application.configurePersistence() { KeyReferences ) commit() - } + } }