-
-
Notifications
You must be signed in to change notification settings - Fork 359
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
setting DATABASE_URL doesn't ignore defaultEnv from .db-migraterc #564
Comments
Actually I think the |
I will check that back thanks for reporting. Environment variables should be always favoured before anything else. |
I run into similar problem with mongodb url, escaping connection string by double quotes worked for me. |
I have a PR out for this, but there is also a work-around. @levino my case sounded a lot like yours. In your database.json you do the following:
Then run the migrate command with |
I'm submitting a...
Current behavior
running
db-migrate
withDATABASE_URL
defined does not ignoredefaultEnv
from.db-migraterc
Expected behavior
running
db-migrate
withDATABASE_URL
respects that value and doesn't try to readdefaultEnv
from.db-migraterc
Minimal reproduction of the problem with instructions
export DATABASE_URL=mysql://<some-valid-connection-string>
.db-migraterc
with adefaultEnv
configured. I chose local instead of dev for my example.db-migrate
.What is the motivation / use case for changing the behavior?
When setting database URL, the intent is that it is defining everything about your environment. To respect the
defaultEnv
setting from.db-migraterc
seems to contradict thatEnvironment
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: