Skip to content

Commit

Permalink
feat(persistence): adjust naming to snake_case and add suffixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pmoscode committed May 11, 2023
1 parent 9b81087 commit 720217f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import org.jetbrains.exposed.dao.id.EntityID
import org.jetbrains.exposed.dao.id.IntIdTable

object VerifiableCredentials : IntIdTable("verifiable_credentials") {
val content = text("content").uniqueIndex("content")
val credentialId = varchar("credential_id", 4096).uniqueIndex("credentialId").nullable()
val content = text("content").uniqueIndex("content_IX")
val credentialId = varchar("credential_id", 4096).uniqueIndex("credential_id_IX").nullable()
val issuerDid = varchar("issuer_did", 4096)
val holderDid = varchar("holder_did", 4096)
val type = varchar("type", 4096)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import org.jetbrains.exposed.sql.javatime.datetime
object KeyReferences : IntIdTable("key_references") {
val bpn = reference("bpn", Wallets.bpn)
val vaultAccestoken = varchar("vault_accestoken", 4096)
val referenceKey = varchar("reference_key", 36).uniqueIndex("bpn")
val referenceKey = varchar("reference_key", 36).uniqueIndex("reference_key_IX")
val createdAt = datetime("created_at").defaultExpression(CurrentDateTime)
val modifiedAt = datetime("modified_at").defaultExpression(CurrentDateTime)
val modifiedFrom = varchar("modified_from", 36)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ object Wallets : IntIdTable("wallets") {
val modifiedFrom = varchar("modified_from", 36)

val name = varchar("name", 127)
var bpn = varchar("bpn", 36).uniqueIndex("bpn")
val did = varchar("did", 2096).uniqueIndex("did")
var bpn = varchar("bpn", 36).uniqueIndex("bpn_IX")
val did = varchar("did", 2096).uniqueIndex("did_IX")
val didDocument = varchar("did_document", 4096)

val active = bool("is_active").default(true)
Expand Down

0 comments on commit 720217f

Please sign in to comment.