Flyway command line with multiple toml files
uksrogers
Posts: 2 New member
Hi there,
I am using teams edition of flyway command line with a single flyway toml file connecting to multiple redshift clusters across multiple tenants. We have a single server that is able to talk to all clusters in all tenants.
With Dev / Test / Prod environments for multiple databases / schemas, the toml file is getting a bit big and unwieldy.
Ideally i'd like all the default settings in one toml file and then have a separate toml file for environment specific settings.
From the documentation, it looks like it's possible to specify multiple toml files but i can't see anything that mentions how to make it work. Is it just as simple as having a global.toml file and then [environments.database1] bits in one file and [environments.database2] in another? and then running flyway info -configFiles ["global.toml","database1.toml"]?
I am using teams edition of flyway command line with a single flyway toml file connecting to multiple redshift clusters across multiple tenants. We have a single server that is able to talk to all clusters in all tenants.
With Dev / Test / Prod environments for multiple databases / schemas, the toml file is getting a bit big and unwieldy.
Ideally i'd like all the default settings in one toml file and then have a separate toml file for environment specific settings.
From the documentation, it looks like it's possible to specify multiple toml files but i can't see anything that mentions how to make it work. Is it just as simple as having a global.toml file and then [environments.database1] bits in one file and [environments.database2] in another? and then running flyway info -configFiles ["global.toml","database1.toml"]?
Answers
I was keen to understand a bit more about how it handles the same variables across multiple files, does it error or does one take precedence over another. Will just have to have a play and see what happens!
If you run flyway with the -X flag then it will show you the 'evolving' configuration as the TOML files are read in.