Skip to content

Commit

Permalink
Update cli.md (#720)
Browse files Browse the repository at this point in the history
* Update cli.md

* Add missing "db" section in the config examples.
* Add missing information about `config-value` option.

* Update docs/cli.md

Co-authored-by: Jan Doležel <[email protected]>
  • Loading branch information
devalnor and dolezel authored Nov 26, 2020
1 parent ff61e4e commit 4d2c2a7
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ You can specify your database connection information using [config](https://www.
```json
// config/default.json
{
"url": "postgres://postgres:password@localhost:5432/database"
"db": {
"url": "postgres://postgres:password@localhost:5432/database"
}
}
```

Expand All @@ -14,11 +16,13 @@ or
```json
// config/default.json
{
"user": "postgres",
"password": "",
"host": "localhost",
"port": 5432,
"database": "database"
"db": {
"user": "postgres",
"password": "",
"host": "localhost",
"port": 5432,
"database": "database"
}
}
```

Expand Down Expand Up @@ -60,6 +64,7 @@ Depending on your project's setup, it may make sense to write some custom grunt/
You can adjust defaults by passing arguments to `node-pg-migrate`:

- `config-file` (`f`) - The file with migration JSON config (defaults to undefined)
- `config-value` - Name of config section with db options (default to `db`)
- `schema` (`s`) - The schema(s) on which migration will be run (defaults to `public`, used to set `search_path`)
- `create-schema` - Create the configured schema if it doesn't exist (defaults to `false`)
- `database-url-var` (`d`) - Name of env variable with database url string (defaults to `DATABASE_URL`)
Expand Down

0 comments on commit 4d2c2a7

Please sign in to comment.