commit d33a8637dbf85a19065d6f501ab2896cb4b5b884
parent 617ea3f9edb3cb7ff83fcf16a5d01d4e34e0d550
Author: Marcello Stanisci <stanisci.m@gmail.com>
Date: Mon, 2 Dec 2019 20:08:38 +0100
respect plural names for tables
Diffstat:
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/DB.kt b/sandbox/src/main/kotlin/tech/libeufin/sandbox/DB.kt
@@ -90,7 +90,7 @@ fun Blob.toByteArray(): ByteArray {
return this.binaryStream.readAllBytes()
}
-object BalanceTable : IntIdTable() {
+object BalancesTable : IntIdTable() {
// Customer ID is the default 'id' field provided by the constructor.
val value = integer("value")
val fraction = integer("fraction").check {
@@ -296,6 +296,7 @@ fun dbCreateTables() {
// addLogger(StdOutSqlLogger)
SchemaUtils.createMissingTablesAndColumns(
+ BalancesTable,
BankCustomersTable,
EbicsSubscribersTable,
EbicsHostsTable,
diff --git a/sandbox/src/test/kotlin/DbTest.kt b/sandbox/src/test/kotlin/DbTest.kt
@@ -16,7 +16,7 @@ class DbTest {
Database.connect("jdbc:h2:mem:test;DB_CLOSE_DELAY=-1", driver = "org.h2.Driver")
transaction {
- SchemaUtils.create(BalanceTable)
+ SchemaUtils.create(BalancesTable)
}
assertFailsWith<ExposedSQLException> {