-
Notifications
You must be signed in to change notification settings - Fork 77
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
Environment Variables for db connection variables. #10
Comments
This feature already exists in the migrations application. You can find out to set up different environments here Init. Let me know if you are looking for something else and I am misunderstanding your request. |
If I'm understanding correctly, @tmackenzie is referring to system environment variables. e.g. define and use something like |
yes, I did refer to system environment variables. I have moved onto another migration maven plugin. best of luck. |
Is this still something people are requesting? There's no vote option for github so I can't tell lol |
FWIW - I don't need it, although it would be a nice to have feature. Our current workaround is to use saltstack to dynamically configure the properties file per environment. And for me the ideal solution would actually be for the migrations to pull their config from etcd, since that's what we're using as our centralized configuration management for our DB connection info. I wouldn't expect that to be high on the feature list though. By far the highest priority item for us is a separate test data migrations. i.e. Configurable migration groups. |
I've always used maven or gradle interpolation do what you just said without the use of saltstack. saltstack does look nice though lol For configurable migration groups, feel free to open an issue or post on the mailing list to discuss it there. |
Based on comments here, it would appear there is a work around or otherwise it's already supported so I'm going to close the ticket. |
Given a user that wants to run migrations
When I specify that I want to use environment variables in my environment's setting file
And I specify which environment variables to use for the connection settings:
And I run
mvn migration:up
ormvn migration:pending
Then set up the db connection using the following:
DB_DRIVER
for thedriver
property,DB_URL
for theurl
property,DB_USERNAME
for theusername
property,DB_PASSWORD
for thepassword
propertyAnd successfully run the migrations.
I'm willing to code this feature If you would accept the PR.
The text was updated successfully, but these errors were encountered: