commit c7a8ed393673c4f093a57bafcdb5c4a239520ea7
parent 2074af0e9337273ba4eabeeff9ca1f8c97391878
Author: MS <ms@taler.net>
Date: Tue, 8 Dec 2020 14:16:08 +0100
Migrating to PostgreSQL: foreign keys issue
Diffstat:
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/DB.kt b/nexus/src/main/kotlin/tech/libeufin/nexus/DB.kt
@@ -230,7 +230,7 @@ object OfferedBankAccountsTable : Table() {
* FIXME(dold): Allow other account and bank identifications than IBAN and BIC
*/
object NexusBankAccountsTable : IdTable<String>() {
- override val id = text("id").entityId()
+ override val id = text("id").entityId().uniqueIndex()
val accountHolder = text("accountHolder")
val iban = text("iban")
val bankCode = text("bankCode")
@@ -296,7 +296,7 @@ class EbicsSubscriberEntity(id: EntityID<Int>) : IntEntity(id) {
}
object NexusUsersTable : IdTable<String>() {
- override val id = text("id").entityId()
+ override val id = text("id").entityId().uniqueIndex()
val passwordHash = text("password")
val superuser = bool("superuser")
}
@@ -309,7 +309,7 @@ class NexusUserEntity(id: EntityID<String>) : Entity<String>(id) {
}
object NexusBankConnectionsTable : IdTable<String>() {
- override val id = NexusBankConnectionsTable.text("id").entityId()
+ override val id = NexusBankConnectionsTable.text("id").entityId().uniqueIndex()
val type = text("type")
val owner = reference("user", NexusUsersTable)
}
@@ -322,7 +322,7 @@ class NexusBankConnectionEntity(id: EntityID<String>) : Entity<String>(id) {
}
object FacadesTable : IdTable<String>() {
- override val id = FacadesTable.text("id").entityId()
+ override val id = FacadesTable.text("id").entityId().uniqueIndex()
val type = text("type")
val creator = reference("creator", NexusUsersTable)
}