node-pg-migrate
Advanced tools
Comparing version 4.6.0 to 4.6.1
# Change Log | ||
## [4.6.1](2020-04-08) | ||
### Fixed | ||
- Accepting Pool Client [#596](https://github.com/salsita/node-pg-migrate/pull/596) | ||
## [4.6.0](2020-04-07) | ||
@@ -4,0 +10,0 @@ |
@@ -1,2 +0,2 @@ | ||
import { Client, ClientConfig, QueryArrayConfig, QueryConfig } from 'pg'; | ||
import { ClientBase, ClientConfig, QueryArrayConfig, QueryConfig } from 'pg'; | ||
import { Logger, DB } from './types'; | ||
@@ -11,3 +11,3 @@ export interface DBConnection extends DB { | ||
} | ||
declare const db: (connection: string | ClientConfig | Client, logger?: Logger) => DBConnection; | ||
declare const db: (connection: string | ClientConfig | ClientBase, logger?: Logger) => DBConnection; | ||
export default db; |
/// <reference types="node" /> | ||
import { Client, QueryArrayResult, QueryResult, QueryArrayConfig, QueryConfig } from 'pg'; | ||
import { ClientBase, QueryArrayResult, QueryResult, QueryArrayConfig, QueryConfig } from 'pg'; | ||
import { TlsOptions } from 'tls'; | ||
@@ -227,4 +227,4 @@ import { Name } from './operations/generalTypes'; | ||
export interface RunnerOptionClient { | ||
dbClient: Client; | ||
dbClient: ClientBase; | ||
} | ||
export declare type RunnerOption = RunnerOptionConfig & (RunnerOptionClient | RunnerOptionUrl); |
@@ -32,1 +32,10 @@ # Miscellaneous Operations | ||
Returns promise with either result of query or returned rows of query (in case of `select`). | ||
--- | ||
### `pgm.noTransaction` | ||
By default, all migrations are run in one transaction, but some DB operations like add type value (`pgm.addTypeValue`) | ||
does not work if the type is not created in the same transaction. E.g. if it is created in previous migration. You need to | ||
run specific migration outside a transaction (`pgm.noTransaction`). Be aware that this means that you can have | ||
some migrations applied and some not applied, if there is some error during migrating (leading to `ROLLBACK`) |
@@ -13,6 +13,7 @@ # Troubleshooting | ||
With the introduction of pg v8, SSL connection options use node defaults. That means e.g. rejecting self-signed | ||
certificates. To be able to accept self-signed certificates you can use `--no-reject-unauthorized` CLI option | ||
or pass database connection info through JSON configuration [see](cli.md). | ||
For explanation [see](https://node-postgres.com/announcements#2020-02-25) and [see](https://github.com/brianc/node-postgres/issues/2009) | ||
With the introduction of pg v8, SSL connection options use node defaults. That means e.g. rejecting self-signed | ||
certificates. To be able to accept self-signed certificates you can use `--no-reject-unauthorized` CLI option | ||
or pass database connection info through JSON configuration [see](cli.md). | ||
For explanation [see](https://node-postgres.com/announcements#2020-02-25) and [see](https://github.com/brianc/node-postgres/issues/2009). | ||
Do not combine it with `?ssl=true` as it overrides ssl config from `--no-reject-unauthorized`. | ||
@@ -40,1 +41,7 @@ ## Camel case, Snake case, case sensitivity | ||
Otherwise server does not run or listen on specified port or there is some other connection problem. You have to investigate... | ||
## Running in transaction | ||
Some DB operations like add type value (`pgm.addTypeValue`) does not work if the type is not created in the same | ||
transaction. E.g. if it is created in previous migration. You need to run specific migration outside transaction | ||
(`pgm.noTransaction`). |
{ | ||
"name": "node-pg-migrate", | ||
"version": "4.6.0", | ||
"version": "4.6.1", | ||
"description": "Postgresql database migration management tool for node.js", | ||
@@ -5,0 +5,0 @@ "author": "Theo Ephraim", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
271440