不要怂,就是干,撸起袖子干!

Commit 93cba388 by Mick Hansen

[fix] apply pgDataTypeMapping to changeColumn, closes #2191

1 parent 8bbaeac3
...@@ -258,7 +258,7 @@ module.exports = (function() { ...@@ -258,7 +258,7 @@ module.exports = (function() {
template = dataType.type.toString(); template = dataType.type.toString();
} }
if (dataType.hasOwnProperty('allowNull') && (!dataType.allowNull)) { if (dataType.allowNull === false) {
template += ' NOT NULL'; template += ' NOT NULL';
} }
......
...@@ -181,7 +181,7 @@ module.exports = (function() { ...@@ -181,7 +181,7 @@ module.exports = (function() {
, sql = []; , sql = [];
for (var attributeName in attributes) { for (var attributeName in attributes) {
var definition = attributes[attributeName]; var definition = this.pgDataTypeMapping(tableName, attributeName, attributes[attributeName]);
var attrSql = ''; var attrSql = '';
if (definition.indexOf('NOT NULL') > 0) { if (definition.indexOf('NOT NULL') > 0) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!