Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple configuration files #1624

jappievw opened this issue May 9, 2017 · 3 comments

Multiple configuration files #1624

jappievw opened this issue May 9, 2017 · 3 comments


Copy link

@jappievw jappievw commented May 9, 2017

What version of Flyway are you using?


Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin, SBT plugin, ANT tasks)


What database are you using (type & version)?

MySQL 5.7 and Aurora

What operating system are you using?

macOS and Amazon Linux

What did you do?

Run flyway -configFile=secrets.conf -configFile=application.conf migrate

The secrets.conf file contains the database credentials including some placeholders which have to be kept safe. It is generated by our CI solution and only available when flyway runs. The application.conf contains the lookup paths for the migrations and some placeholders. It is included in the repository and maintained by our developers.

What did you expect to see?

A merge of the two configuration files where the last one takes precedence over the first one.

What did you see instead?

I had to provide the database credentials when running flyway.

Copy link

@nycjay nycjay commented Aug 17, 2017

+1 for this feature. Or the ability to specify placeholders in a separate file
flyway -configFile=myconfiguration.conf -placeholderFile=placeholdersForThisRelease.conf migrate

Our configuration file is pretty static - connection information, schema, basic setting, etc. Our placeholders may vary from release to release, and a given placeholder may on my applicable for a single release. Separating them into multiple folders will make it easier to manage.

@axelfontaine axelfontaine added this to the Flyway 5.0.0 milestone Oct 24, 2017
axelfontaine added a commit to flyway/ that referenced this issue Nov 27, 2017
Copy link

@axelfontaine axelfontaine commented Nov 27, 2017

This has now been implemented using a new -configFiles=... argument.

Copy link

@Roemer Roemer commented Jan 16, 2020

Was the original -configFile removed entirely from Flyway? If so, in which version? (can't find it in Incompatible Changes in the changelog)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants