Skip to content

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

Merged
merged 25 commits into from
May 27, 2025
Merged

Opprett databasetabell for dialogIder #4

merged 25 commits into from
May 27, 2025

Conversation

magnusae
Copy link
Contributor

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å.

@magnusae magnusae requested a review from a team as a code owner May 26, 2025 13:35
@@ -20,6 +20,13 @@ object Env {
val kafkaKeystorePath = "KAFKA_KEYSTORE_PATH".fromEnv()
}

object Database {
val url = "NAIS_DATABASE_DIALOG_DIALOG_JDBC_URL".fromEnv()
Copy link
Contributor

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?


fun postgresContainer(): PostgreSQLContainer<Nothing> =
PostgreSQLContainer<Nothing>("postgres:17").apply {
setCommand("postgres", "-c", "fsync=off", "-c", "log_statement=all", "-c", "wal_level=logical")
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, takk 💯

@magnusae magnusae merged commit 6ca827c into main May 27, 2025
2 checks passed
@magnusae magnusae deleted the dev/opprett_db branch May 27, 2025 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants