How can we help you today? How can we help you today?

Flyway command line with multiple toml files

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"]?
uksrogers
0

Comments

3 comments

  • AlistairW
    Yes it is that simple. I used this format though:  
    flyway info -configFiles="global.toml, database1.toml"


    AlistairW
    0
  • uksrogers
    Thanks for the response @AlistairW, i've since given it a go and managed to get it working as you've described.

    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!
    uksrogers
    0
  • AlistairW
    It doesn't do any clever merging, if you redefine a variable in a TOML file later in the list then that will replace a previous value entirely so take care !
    If you run flyway with the -X flag then it will show you the 'evolving' configuration as the TOML files are read in.
    AlistairW
    0

Add comment

Please sign in to leave a comment.