This repository was archived by the owner on Apr 19, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +24
-4
lines changed
Expand file tree Collapse file tree 1 file changed +24
-4
lines changed Original file line number Diff line number Diff line change @@ -20,17 +20,37 @@ npm install --save @synor/database-postgresql
2020
2121## URI
2222
23- ** Format** : ` postgresql://[user[:password]@][hostname][:port][/dbname][?param1=value1 &...] `
23+ ** Format** : ` postgresql://[user[:password]@][hostname][:port]/database[?param=value &...] `
2424
2525** Params** :
2626
27- | Name | Description | Default Value |
28- | ------------------------------ | ------------------------------- | ------------------------ |
29- | ` synor_migration_record_table ` | Name for Migration Record Table | ` synor_migration_record ` |
27+ | Name | Description | Default Value |
28+ | ------------------------------ | ----------------------------------------------------------------------------- | ------------------------ |
29+ | ` schema ` | [ PostgreSQL Schema] ( https://www.postgresql.org/docs/current/ddl-schemas.html ) | ` public ` |
30+ | ` ssl ` | [ SSL configuration] ( https://node-postgres.com/features/sslu ) | ` false ` |
31+ | ` synor_migration_record_table ` | Name for Migration Record Table | ` synor_migration_record ` |
3032
3133** Examples** :
3234
3335- ` postgresql://postgres:postgres@127.0.0.1:5432/synor?synor_migration_record_table=migration_record `
36+ - ` postgresql://postgres:postgres@127.0.0.1:5432/synor?schema=synor `
37+
38+ ``` js
39+ // SSL Example
40+
41+ const ssl = {
42+ ca: ' <path-to-file>' ,
43+ cert: ' <path-to-file>' ,
44+ key: ' <path-to-file>' ,
45+ passphrase: ' <string>' ,
46+ rejectUnauthorized: ' <boolean>' ,
47+ secureOptions: ' <number>'
48+ }
49+
50+ const uri = ` postgresql://postgres:postgres@127.0.0.1:5432/synor?ssl=${ encodeURIComponent (
51+ JSON .stringify (ssl)
52+ )} `
53+ ```
3454
3555## License
3656
You can’t perform that action at this time.
0 commit comments