-
Notifications
You must be signed in to change notification settings - Fork 496
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
feature request: Add environment variable support for migrations directory. #329
Comments
Hmm, I can't think of a good reason why there is no env option for the migrations directory. Not sure about processing .env though. I think most users will have something like https://github.com/direnv/direnv, https://www.npmjs.com/package/dotenv (or equivalent) to load/unload env variable. So as long as |
Reading the .env file would be convenient when using it as a CLI. I know you can use other software on top but it seems like an easy feature to add and would be very convenient. |
Opened a PR to add this env variable I'm not entirely sold on adding .env support into goose directly. I think .env, .envrc, etc. are a solved problem outside CLI's, but I could be wrong. I'm inclined to leave it as an env variable for now, but we can always revisit this if more folks ask for it and use something like: https://github.com/joho/godotenv |
If not
|
Please and dotenv processing. |
Re-opening this issue so we can track its popularity, and differentiate it from #347 (which is mainly about variable replacement, and less about reading .env files) |
Even if it was an optional flag that was disabled by default, e.g. |
Currently there are the options for
GOOSE_DRIVER=DRIVER
GOOSE_DBSTRING=DBSTRING
It should also support a env var for migrations directory.
It should also detect and process a .env file if one exists.
The text was updated successfully, but these errors were encountered: