File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
migration/src/main/scala/akka/persistence/postgres/migration Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -18,8 +18,8 @@ import slick.jdbc.JdbcBackend
1818import scala .concurrent .Future
1919import scala .util .Try
2020
21- class AkkaPersistencePostgresMigration private (flyway : Flyway , onComplete : Try [MigrateResult ] => Unit )(
22- implicit system : ActorSystem ) {
21+ class AkkaPersistencePostgresMigration private (flyway : Flyway , onComplete : Try [MigrateResult ] => Unit )(implicit
22+ system : ActorSystem ) {
2323
2424 /**
2525 * Perform journal & snapshot store migrations.
@@ -46,7 +46,13 @@ object AkkaPersistencePostgresMigration {
4646 def configure (config : Config ): Builder = {
4747 val flywayConfig =
4848 Flyway .configure.table(" persistence_schema_history" )
49- Builder (flywayConfig, config)
49+ val journalConfigPath = config.getString(" akka.persistence.journal.plugin" )
50+ val schema = {
51+ val journalSchemaCfgKey = s " $journalConfigPath.tables.journal.schemaName "
52+ if (config.hasPath(journalSchemaCfgKey)) config.getString(journalSchemaCfgKey)
53+ else " public"
54+ }
55+ Builder (flywayConfig, config).withSchemaHistoryTableSchema(schema)
5056 }
5157
5258 case class Builder private (flywayConfig : FluentConfiguration , config : Config ) {
You can’t perform that action at this time.
0 commit comments