Skip to content

Commit

Permalink
Merge pull request #781 from playframework/mergify/bp/main/pr-779
Browse files Browse the repository at this point in the history
Upgrade flyway-sbt + flyway-core to 10.21.0 (backport #779) by @mkurz
  • Loading branch information
mkurz authored Nov 16, 2024
2 parents 1e4315c + 4c98540 commit d1965bf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
18 changes: 12 additions & 6 deletions scala/isolated-slick/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ lazy val databaseUrl = sys.env.getOrElse("DB_DEFAULT_URL", "jdbc:h2:./test")
lazy val databaseUser = sys.env.getOrElse("DB_DEFAULT_USER", "sa")
lazy val databasePassword = sys.env.getOrElse("DB_DEFAULT_PASSWORD", "")

val FlywayVersion = "9.21.1"
val FlywayVersion = "10.21.0"

(ThisBuild / version) := "1.1-SNAPSHOT"

Expand All @@ -32,7 +32,11 @@ val FlywayVersion = "9.21.1"
lazy val flyway = (project in file("modules/flyway"))
.enablePlugins(FlywayPlugin)
.settings(
libraryDependencies += "org.flywaydb" % "flyway-core" % FlywayVersion,
libraryDependencies += ("org.flywaydb" % "flyway-core" % FlywayVersion).excludeAll(
ExclusionRule("com.fasterxml.jackson.core"),
ExclusionRule("com.fasterxml.jackson.dataformat"),
ExclusionRule("com.fasterxml.jackson.datatype")
),
flywayLocations := Seq("classpath:db/migration"),
flywayUrl := databaseUrl,
flywayUser := databaseUser,
Expand Down Expand Up @@ -86,11 +90,13 @@ lazy val root = (project in file("."))
TwirlKeys.templateImports += "com.example.user.User",
libraryDependencies ++= Seq(
guice,
"com.h2database" % "h2" % "1.4.200", // Can't use latest h2 currently: flyway-sbt comes with an outdated flyway version that does not support h2 2.x yet...:
// https://github.com/flyway/flyway-sbt/blob/7fc35d2833531b2b9e5a98a594d76fd047a077a8/build.sbt#L1
// https://github.com/flyway/flyway-sbt/issues/82#issuecomment-1636728997
"com.h2database" % "h2" % "2.3.232",
ws % Test,
"org.flywaydb" % "flyway-core" % FlywayVersion % Test,
("org.flywaydb" % "flyway-core" % FlywayVersion % Test).excludeAll(
ExclusionRule("com.fasterxml.jackson.core"),
ExclusionRule("com.fasterxml.jackson.dataformat"),
ExclusionRule("com.fasterxml.jackson.datatype")
),
"org.scalatestplus.play" %% "scalatestplus-play" % "7.0.1" % Test
),
(Test / fork) := true
Expand Down
4 changes: 2 additions & 2 deletions scala/isolated-slick/project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
libraryDependencies += "com.h2database" % "h2" % "1.4.200" // Can't use latest h2 currently: https://github.com/flyway/flyway-sbt/issues/82#issuecomment-1636728997
libraryDependencies += "com.h2database" % "h2" % "2.3.232"

// Database migration
// https://github.com/flyway/flyway-sbt
addSbtPlugin("io.github.davidmweber" % "flyway-sbt" % "7.4.0")
addSbtPlugin("com.github.sbt" % "flyway-sbt" % "10.21.0")

// Slick code generation
// https://github.com/tototoshi/sbt-slick-codegen
Expand Down

0 comments on commit d1965bf

Please sign in to comment.