node-pg-migrate
Advanced tools
Comparing version 2.23.0 to 2.23.1
# Change Log | ||
## [2.23.1] (2018-02-21) | ||
### Fixed | ||
- Correct handling of multiline constraints [#202](https://github.com/salsita/node-pg-migrate/pull/202) | ||
## [2.23.0] (2018-02-20) | ||
@@ -4,0 +10,0 @@ |
@@ -21,4 +21,6 @@ 'use strict'; | ||
var formatLines = function formatLines(lines, replace) { | ||
var separator = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ',\n'; | ||
return lines.join(separator).replace(/^/gm, replace); | ||
var separator = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ','; | ||
return lines.map(function (line) { | ||
return line.replace(/(?:\r\n|\r|\n)+/g, ' '); | ||
}).join(`${separator}\n`).replace(/^/gm, replace); | ||
}; | ||
@@ -224,3 +226,3 @@ | ||
return _utils.template`ALTER TABLE "${tableName}" | ||
${formatLines((0, _utils.quote)(columns), ` DROP ${ifExists ? ' IF EXISTS' : ''}`, `${cascade ? ' CASCADE' : ''},\n`)};`; | ||
${formatLines((0, _utils.quote)(columns), ` DROP ${ifExists ? ' IF EXISTS' : ''}`, `${cascade ? ' CASCADE' : ''},`)};`; | ||
}; | ||
@@ -227,0 +229,0 @@ |
@@ -33,3 +33,3 @@ { | ||
], | ||
"version": "2.23.0", | ||
"version": "2.23.1", | ||
"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
170834
2075