flyway-play
flyway-play copied to clipboard
How to set Flyway config params
We need to disable Postgres locks as described here https://flywaydb.org/documentation/database/postgresql#lock-types
Does flyway-play look for flyway.conf
file?
How do we set flyway.postgresql.transactional.lock=false
in flyway-play?
flyway-play does not currently support flyway.conf. (but this issue made me want to support it)
https://github.com/flyway/flyway/blob/3c6685e663492064fe85ada629c6368f22de3b24/flyway-core/src/main/java/org/flywaydb/core/internal/database/postgresql/PostgreSQLConfigurationExtension.java#L39
From this code, it seems that the environment variable FLYWAY_POSTGRESQL_TRANSACTIONAL_LOCK
can be used instead. Can this be a workaround for the time being?
Thanks @tototoshi I tried setting FLYWAY_POSTGRESQL_TRANSACTIONAL_LOCK
, but it didn't seem to work.
Also, I asked a related question here https://github.com/flyway/flyway/issues/3492
I would like to work on this, would it be enough just to add
flyway.envVars()
before we load the flyway instance? somewhere here
I found also
flyway.loadDefaultConfigurationFiles()
for loading flyway.conf from default locations. We could add both, wdyt? But we should discuss precedence of these configurations. For env variables it's probably desired to override a configuration file, but should flyway.conf
override application.conf
, or the other way?
Hi @tototoshi, am I on the right track with this one?
@slivkamiro Thank you! I will take a look.
But we should discuss precedence of these configurations. For env variables it's probably desired to override a configuration file, but should flyway.conf override application.conf, or the other way?
For the time being, I think the environment variable settings should override the application.conf settings. flyway-play is currently only considering the application.conf configuration of the Play Framework, and flyway.conf is not supported.
If I get a chance, I would like to improve flyway-play so that it can be configured with flyway.conf.
Fixed by https://github.com/flyway/flyway-play/pull/389