node-pg-migrate
Advanced tools
Comparing version 2.22.1 to 2.22.2
# Change Log | ||
## [2.22.2] (2018-02-20) | ||
### Fixed | ||
- Role encrypted default [#196](https://github.com/salsita/node-pg-migrate/pull/196) | ||
- Running queries in order [#195](https://github.com/salsita/node-pg-migrate/pull/195) | ||
## [2.22.1] (2018-02-20) | ||
@@ -4,0 +11,0 @@ |
@@ -29,3 +29,3 @@ 'use strict'; | ||
if (roleOptions.password) { | ||
options.push(`${!roleOptions.encrypted ? 'UNENCRYPTED' : 'ENCRYPTED'} PASSWORD ${(0, _utils.escapeValue)(roleOptions.password)}`); | ||
options.push(`${roleOptions.encrypted === false ? 'UNENCRYPTED' : 'ENCRYPTED'} PASSWORD ${(0, _utils.escapeValue)(roleOptions.password)}`); | ||
} | ||
@@ -32,0 +32,0 @@ if (roleOptions.valid) { |
@@ -172,11 +172,19 @@ 'use strict'; | ||
return (_Promise$resolve$then = Promise.resolve().then(function () { | ||
var promise = Promise.resolve(); | ||
if (options.schema) { | ||
if (options.create_schema) { | ||
db.query(`CREATE SCHEMA IF NOT EXISTS '${options.schema}'`); | ||
promise = promise.then(function () { | ||
return db.query(`CREATE SCHEMA IF NOT EXISTS '${options.schema}'`); | ||
}); | ||
} | ||
db.query(`SET SCHEMA '${options.schema}'`); | ||
promise = promise.then(function () { | ||
return db.query(`SET SCHEMA '${options.schema}'`); | ||
}); | ||
} | ||
if (options.migrations_schema && options.create_migrations_schema) { | ||
db.query(`CREATE SCHEMA IF NOT EXISTS '${options.migrations_schema}'`); | ||
promise = promise.then(function () { | ||
return db.query(`CREATE SCHEMA IF NOT EXISTS '${options.migrations_schema}'`); | ||
}); | ||
} | ||
return promise; | ||
}).then(function () { | ||
@@ -183,0 +191,0 @@ return Promise.all([loadMigrationFiles(db, options), getRunMigrations(db, options)]); |
@@ -33,3 +33,3 @@ { | ||
], | ||
"version": "2.22.1", | ||
"version": "2.22.2", | ||
"engines": { | ||
@@ -36,0 +36,0 @@ "node": ">=4.0.0" |
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
170317
2071