on main help sign in
Replace POSTGRES_URL env var with DB_URL
5529d22fabianlindfors
README.md+1−1
@@ -563,7 +563,7 @@ The options below can be used with all commands that communicate with Postgres.
563
563
564| Option | Default | Description |
564| Option | Default | Description |
565| ------ | ------- | ----------- |
565| ------ | ------- | ----------- |
566−| `--url` | | URI to connect to your Postgres database.<br>Can also be provided with the environment variable `DATABASE_URL`. |
566+| `--url` | | URI to connect to your Postgres database.<br>Can also be provided with the environment variable `DB_URL`. |
567| `--host` | `localhost` | Hostname to use when connecting to Postgres |
567| `--host` | `localhost` | Hostname to use when connecting to Postgres |
568| `--port` | `5432` | Port which Postgres is listening on |
568| `--port` | `5432` | Port which Postgres is listening on |
569| `--database` | `postgres` | Database name |
569| `--database` | `postgres` | Database name |
src/main.rs+1−1
@@ -105,7 +105,7 @@ fn run(opts: Opts) -> anyhow::Result<()> {
105}
105}
106
106
107fn reshape_from_connection_options(opts: &ConnectionOptions) -> anyhow::Result<Reshape> {
107fn reshape_from_connection_options(opts: &ConnectionOptions) -> anyhow::Result<Reshape> {
108− let env_url = std::env::var("POSTGRES_URL").ok();
108+ let env_url = std::env::var("DB_URL").ok();
109 let url = env_url.as_ref().or_else(|| opts.url.as_ref());
109 let url = env_url.as_ref().or_else(|| opts.url.as_ref());
110
110
111 match url {
111 match url {