Skip to content

Commit

Permalink
Merge pull request #779 from mkurz/flyway-sbt_upgrade_30x
Browse files Browse the repository at this point in the history
[3.0.x] Upgrade flyway-sbt + flyway-core to 10.21.0
  • Loading branch information
mkurz authored Nov 16, 2024
2 parents aca9812 + c347b53 commit ed96a83
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
18 changes: 12 additions & 6 deletions play-scala-isolated-slick-example/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,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 @@ -30,7 +30,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 @@ -84,11 +88,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 play-scala-isolated-slick-example/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 ed96a83

Please sign in to comment.