db-migrate-pg
Advanced tools
Comparing version 0.2.2 to 0.2.3
10
index.js
@@ -49,3 +49,4 @@ var util = require('util'); | ||
}) | ||
var type = spec.autoIncrement ? '' : this.mapDataType(spec.type); | ||
var type = (spec.primaryKey && spec.autoIncrement) ? '' : | ||
this.mapDataType(spec.type); | ||
var len = spec.length ? util.format('(%s)', spec.length) : ''; | ||
@@ -285,7 +286,10 @@ var constraint = this.createColumnConstraint(spec, options, tableName, name); | ||
if (spec.primaryKey && options.emitPrimaryKey) { | ||
if (spec.primaryKey) { | ||
if (spec.autoIncrement) { | ||
constraint.push('SERIAL'); | ||
} | ||
constraint.push('PRIMARY KEY'); | ||
if (options.emitPrimaryKey) { | ||
constraint.push('PRIMARY KEY'); | ||
} | ||
} | ||
@@ -292,0 +296,0 @@ |
{ | ||
"name": "db-migrate-pg", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"description": "A postgresql driver for db-migrate", | ||
@@ -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
19966
421