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
20
20
21
21
## URI
22
22
23
- ** Format** : ` postgresql://[user[:password]@][hostname][:port][/dbname][?param1=value1 &...] `
23
+ ** Format** : ` postgresql://[user[:password]@][hostname][:port]/database[?param=value &...] `
24
24
25
25
** Params** :
26
26
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 ` |
30
32
31
33
** Examples** :
32
34
33
35
- ` 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
+ ```
34
54
35
55
## License
36
56
You can’t perform that action at this time.
0 commit comments