-
Notifications
You must be signed in to change notification settings - Fork 0
Opprett databasetabell for dialogIder #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
src/main/kotlin/Env.kt
Outdated
@@ -20,6 +20,13 @@ object Env { | |||
val kafkaKeystorePath = "KAFKA_KEYSTORE_PATH".fromEnv() | |||
} | |||
|
|||
object Database { | |||
val url = "NAIS_DATABASE_DIALOG_DIALOG_JDBC_URL".fromEnv() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kunne man hatt en variabel med database prefix så man ikke gjentar det samme 4 ganger?
src/test/kotlin/FunSpecWithDb.kt
Outdated
|
||
fun postgresContainer(): PostgreSQLContainer<Nothing> = | ||
PostgreSQLContainer<Nothing>("postgres:17").apply { | ||
setCommand("postgres", "-c", "fsync=off", "-c", "log_statement=all", "-c", "wal_level=logical") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Denne kommandoen er pga database replikering i simba. Tenker du kan fjerne den her.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, takk 💯
Bakgrunn
Når vi skal hekte en sykepengesøknad på en dialog, så må vi vite hvilken dialog den hører hjemme i.
Løsning
Tok databaseoppsettet fra Simba og lagde en databasetabell for å lagre ned koblingen mellom sykmeldingIder og dialogIder. Søknader har en sykmeldingId-kobling, så ved å slå opp i databasen kan vi hvilken dialog vi skal legge søknaden på.