Skip to content
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

Update flyway-core, flyway-mysql to 9.22.2 #301

Merged
merged 2 commits into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ val Library = new {
val metricsV = "4.2.19"
val cats = "2.0.0"
val logback = "1.4.11"
val flyway = "8.5.13"
val flyway = "9.22.2"
}

val logback = "ch.qos.logback" % "logback-classic" % Version.logback
Expand Down
1 change: 1 addition & 0 deletions libats-db/src/main/resources/reference.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
ats.database {
migrate = true
migrate = ${?DB_MIGRATE}
flyway.clean-disabled = false
skipMigrationCheck = false
skipMigrationCheck = ${?SKIP_MIGRATION_CHECK}
asyncMigrations = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ protected [libats] object LibatsFlyway {
flywayConfig.table(dbConfig.getString("flyway.schema-table"))
}

if (dbConfig.hasPath("flyway.clean-disabled")) {
flywayConfig.cleanDisabled(dbConfig.getBoolean("flyway.clean-disabled"))
}

if (dbConfig.hasPath("flyway.schema")) {
flywayConfig.schemas(dbConfig.getString("flyway.schema"))
} else if (dbConfig.hasPath("database")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ trait DatabaseSpec[P <: BasicProfile] extends BeforeAndAfterAll {
Flyway.configure()
.dataSource(url, user, password)
.schemas(schemaName)
.cleanDisabled(false)
.load()
}

Expand Down
Loading