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

Commit 8bbaeac3 by Mick Hansen

[chore] remove enum missing values check from query generator

1 parent e847cd97
Showing with 0 additions and 4 deletions
......@@ -251,14 +251,10 @@ module.exports = (function() {
var template;
if (dataType.type.toString() === DataTypes.ENUM.toString()) {
if (Array.isArray(dataType.values) && (dataType.values.length > 0)) {
template = 'ENUM(' + Utils._.map(dataType.values, function(value) {
return this.escape(value);
}.bind(this)).join(', ') + ')';
} else {
throw new Error('Values for ENUM haven\'t been defined.');
}
} else {
template = dataType.type.toString();
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!