Document environment variable usage in README (#500) - #837
Merged
Merged
Conversation
Add a README section covering which settings map to which env vars, default `.env` loading, `--env-file`, and precedence relative to the process environment and CLI flags. Refs amacneil#500.
3 tasks
dossy
approved these changes
Sep 14, 2026
dossy
left a comment
Collaborator
There was a problem hiding this comment.
Nice and concise. Would like to see if anyone else still has questions that aren't answered by this that should be included, but I think this is fine to merge as-is.
dossy
added a commit
to cslovell/dbmate
that referenced
this pull request
Sep 15, 2026
* main: Bump @humanfs/node from 0.16.6 to 0.16.8 in /typescript (amacneil#832) Bump google.golang.org/grpc from 1.82.1 to 1.83.1 (amacneil#831) Bump brace-expansion from 1.1.14 to 1.1.18 in /typescript (amacneil#830) Replace broken Homebrew bump action with brew bump-formula-pr (amacneil#814) Bump golang from 1.26.5 to 1.26.6 (amacneil#826) fix: bump vulnerable indirect Go dependencies (amacneil#825) Document environment variable usage in README (amacneil#500) (amacneil#837) # Conflicts: # go.mod # go.sum
dossy
added a commit
to MatthiasKunnen/dbmate
that referenced
this pull request
Sep 15, 2026
…ng-tests * upstream/main: (88 commits) fix: bump golang.org/x/crypto to v0.55.0 (CVE-2026-56854) (amacneil#833) Bump @humanfs/node from 0.16.6 to 0.16.8 in /typescript (amacneil#832) Bump google.golang.org/grpc from 1.82.1 to 1.83.1 (amacneil#831) Bump brace-expansion from 1.1.14 to 1.1.18 in /typescript (amacneil#830) Replace broken Homebrew bump action with brew bump-formula-pr (amacneil#814) Bump golang from 1.26.5 to 1.26.6 (amacneil#826) fix: bump vulnerable indirect Go dependencies (amacneil#825) Document environment variable usage in README (amacneil#500) (amacneil#837) v2.35.1 (amacneil#829) v2.35.0 (amacneil#822) Bump google.golang.org/grpc from 1.80.0 to 1.82.1 (amacneil#819) Bump actions/setup-node from 6 to 7 (amacneil#815) Bump actions/setup-go from 6 to 7 (amacneil#818) fix: remove extra bound argument in BigQuery InsertMigration (amacneil#817) fix: correct typos in README and source comment (amacneil#809) Bumps bump-homebrew-formula-action to v4.1 (amacneil#813) v2.34.0 (amacneil#812) Bump alpine from 3.23.4 to 3.24.1 (amacneil#801) Bump js-yaml from 4.1.1 to 4.3.0 in /typescript (amacneil#806) Bump actions/checkout from 6 to 7 (amacneil#805) ...
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a README section documenting how dbmate uses environment variables, as requested in #500 (follow-up to #491 /
--env-file).The new Environment Variables section covers:
DATABASE_URL,DBMATE_*, plusDBMATE_VERBOSE).envfrom the current working directory--env-filefor one or more dotenv files (and that specifying it replaces the default.envunless included)--urlover--env/DATABASE_URLAlso adds a short cross-link from Connecting to the Database, and a TOC entry.
Docs only; behavior verified against
main.go(loadEnvFiles, flagEnvVars,getDatabaseURL) andmain_test.go.Closes #500.
Test plan
main.go/main_test.go