diff --git a/core/src/test/scala/akka/persistence/postgres/journal/JournalPartitioningSpec.scala b/core/src/test/scala/akka/persistence/postgres/journal/JournalPartitioningSpec.scala index 37920d3f..ba789c8c 100644 --- a/core/src/test/scala/akka/persistence/postgres/journal/JournalPartitioningSpec.scala +++ b/core/src/test/scala/akka/persistence/postgres/journal/JournalPartitioningSpec.scala @@ -103,7 +103,7 @@ abstract class JournalPartitioningSpec(schemaType: SchemaType) probe.expectMsg(WriteMessagesSuccessful) (fromSnr to toSnr).foreach { i => probe.expectMsgPF() { - case WriteMessageSuccess(PersistentImpl(payload, `i`, `pid`, _, _, `sender`, `writerUuid`, _), _) => + case WriteMessageSuccess(PersistentImpl(payload, `i`, `pid`, _, _, `sender`, `writerUuid`, _, None), _) => payload should be(s"a-$i") } } @@ -150,7 +150,7 @@ abstract class JournalPartitioningSpec(schemaType: SchemaType) pid: String, writerUuid: String, deleted: Boolean = false): ReplayedMessage = - ReplayedMessage(PersistentImpl(s"a-$snr", snr, pid, "", deleted, Actor.noSender, writerUuid, 0L)) + ReplayedMessage(PersistentImpl(s"a-$snr", snr, pid, "", deleted, Actor.noSender, writerUuid, 0L, None)) } diff --git a/core/src/test/scala/akka/persistence/postgres/journal/PostgresJournalSpec.scala b/core/src/test/scala/akka/persistence/postgres/journal/PostgresJournalSpec.scala index fb410938..1bf4907e 100644 --- a/core/src/test/scala/akka/persistence/postgres/journal/PostgresJournalSpec.scala +++ b/core/src/test/scala/akka/persistence/postgres/journal/PostgresJournalSpec.scala @@ -101,7 +101,7 @@ trait PartitionedJournalSpecTestCases { } def replayedPostgresMessage(snr: Long, pid: String, deleted: Boolean = false): ReplayedMessage = - ReplayedMessage(PersistentImpl(s"a-$snr", snr, pid, "", deleted, Actor.noSender, writerUuid, 0L)) + ReplayedMessage(PersistentImpl(s"a-$snr", snr, pid, "", deleted, Actor.noSender, writerUuid, 0L, None)) } class NestedPartitionsJournalSpec extends PostgresJournalSpec("nested-partitions-application.conf", NestedPartitions) diff --git a/migration/src/main/scala/akka/persistence/postgres/migration/AkkaPersistencePostgresMigration.scala b/migration/src/main/scala/akka/persistence/postgres/migration/AkkaPersistencePostgresMigration.scala index 12930cf3..6c041fc3 100644 --- a/migration/src/main/scala/akka/persistence/postgres/migration/AkkaPersistencePostgresMigration.scala +++ b/migration/src/main/scala/akka/persistence/postgres/migration/AkkaPersistencePostgresMigration.scala @@ -11,18 +11,19 @@ import com.typesafe.config.Config import javax.sql.DataSource import org.flywaydb.core.Flyway import org.flywaydb.core.api.configuration.FluentConfiguration +import org.flywaydb.core.api.output.MigrateResult import slick.jdbc.JdbcBackend import scala.concurrent.Future import scala.util.Try -class AkkaPersistencePostgresMigration private (flyway: Flyway, onComplete: Try[Int] => Unit)( +class AkkaPersistencePostgresMigration private (flyway: Flyway, onComplete: Try[MigrateResult] => Unit)( implicit system: ActorSystem) { /** * Perform journal & snapshot store migrations. * - * @return Future containing a number of successfully applied migrations. + * @return Future containing a number of executed migrations. */ def run: Future[Int] = { import system.dispatcher @@ -35,7 +36,7 @@ class AkkaPersistencePostgresMigration private (flyway: Flyway, onComplete: Try[ migrationFut.onComplete(onComplete) - migrationFut + migrationFut.map(_.migrationsExecuted) } } diff --git a/project/Dependencies.scala b/project/Dependencies.scala index c46dd682..0b700b96 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -1,22 +1,22 @@ import sbt._ object Dependencies { - val Scala212 = "2.12.11" - val Scala213 = "2.13.1" + val Scala212 = "2.12.12" + val Scala213 = "2.13.3" val ScalaVersions = Seq(Scala212, Scala213) - val AkkaVersion = "2.6.5" + val AkkaVersion = "2.6.10" val AkkaBinaryVersion = "2.6" val SlickVersion = "3.3.2" - val ScalaTestVersion = "3.1.2" - val SlickPgVersion = "0.19.2" + val ScalaTestVersion = "3.2.0" + val SlickPgVersion = "0.19.3" - val ScaffeineVersion = "4.0.1" + val ScaffeineVersion = "4.0.2" val LogbackVersion = "1.2.3" - val JdbcDrivers = Seq("org.postgresql" % "postgresql" % "42.2.12") + val JdbcDrivers = Seq("org.postgresql" % "postgresql" % "42.2.17") val Libraries: Seq[ModuleID] = Seq( "com.typesafe.akka" %% "akka-persistence-query" % AkkaVersion, @@ -33,7 +33,7 @@ object Dependencies { "org.scalatest" %% "scalatest" % ScalaTestVersion % Test) ++ JdbcDrivers.map(_ % Test) val Migration: Seq[ModuleID] = Seq( - "org.flywaydb" % "flyway-core" % "6.5.6", + "org.flywaydb" % "flyway-core" % "7.0.2", "ch.qos.logback" % "logback-classic" % LogbackVersion, "com.typesafe.akka" %% "akka-slf4j" % AkkaVersion) ++ JdbcDrivers } diff --git a/project/plugins.sbt b/project/plugins.sbt index 192accf9..bc57a0ea 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,6 +1,6 @@ // compliance -addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.0") -addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.7.0") +addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2") +addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.8.0") // release addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.3") // docs