db-migrate-base
Advanced tools
Comparing version 1.5.1 to 1.5.2
15
index.js
@@ -164,2 +164,10 @@ var util = require('util'); | ||
_handleMultiPrimaryKeys: function(primaryKeyColumns) { | ||
return util.format(', PRIMARY KEY (%s)', | ||
this.quoteDDLArr(primaryKeyColumns.map(function(value) { | ||
return value.name; | ||
})).join(', ')); | ||
}, | ||
createTable: function(tableName, options, callback) { | ||
@@ -190,3 +198,3 @@ log.verbose('creating table:', tableName); | ||
if (columnSpec.primaryKey) { | ||
primaryKeyColumns.push(columnName); | ||
primaryKeyColumns.push({ spec: columnSpec, name: columnName }); | ||
} | ||
@@ -197,6 +205,7 @@ } | ||
if (primaryKeyColumns.length > 1) { | ||
pkSql = util.format(', PRIMARY KEY (%s)', | ||
this.quoteDDLArr(primaryKeyColumns).join(', ')); | ||
pkSql = this._handleMultiPrimaryKeys(primaryKeyColumns); | ||
} else { | ||
primaryKeyColumns[0] = primaryKeyColumns[0].name; | ||
columnDefOptions.emitPrimaryKey = true; | ||
@@ -203,0 +212,0 @@ } |
{ | ||
"name": "db-migrate-base", | ||
"version": "1.5.1", | ||
"version": "1.5.2", | ||
"description": "db-migrate base driver", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
24613
629