Skip to content

Commit

Permalink
Merge branch 'main' into kafka_receiver_signal_ebms_provider
Browse files Browse the repository at this point in the history
  • Loading branch information
thburnett authored Jan 7, 2025
2 parents 8c2cadc + 104231d commit 93e8452
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package no.nav.emottak.cpa.persistence

import com.zaxxer.hikari.HikariConfig
import com.zaxxer.hikari.HikariDataSource
import no.nav.emottak.util.getEnvVar
import org.flywaydb.core.Flyway
import org.jetbrains.exposed.sql.Database

Expand All @@ -18,6 +19,11 @@ class Database(
.dataSource(migrationConfig.jdbcUrl, migrationConfig.username, migrationConfig.password)
.initSql("SET ROLE \"$CPA_DB_NAME-admin\"")
.lockRetryCount(50)
.also {
if (getEnvVar("NAIS_CLUSTER_NAME", "local") == "local") {
it.locations("filesystem:src/main/resources/db/migration")
}
}
.load()
.migrate()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Database(
.lockRetryCount(50)
.also {
if (getEnvVar("NAIS_CLUSTER_NAME", "local") == "local") {
it.locations("filesystem:src/main/resources/db/migrations")
it.locations("filesystem:src/main/resources/db/migration")
}
}
.load()
Expand Down

0 comments on commit 93e8452

Please sign in to comment.