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

Commit 631c2c07 by tngraessler

Now using lodash.map(...)

1 parent a0f0f5b2
Showing with 1 additions and 7 deletions
......@@ -70,13 +70,7 @@ module.exports = (function() {
if (!!options.uniqueKeys) {
Utils._.each(options.uniqueKeys, function(columns) {
values.attributes += ", UNIQUE uniq_" + tableName + '_' + columns.fields.join('_') + " (";
var i = 0;
Utils._.each(columns.fields, function(field) {
if(i++ > 0) values.attributes += ", ";
values.attributes += self.quoteIdentifier(field);
});
values.attributes += ")";
values.attributes += ", UNIQUE uniq_" + tableName + '_' + columns.fields.join('_') + " (" + Utils._.map(columns.fields, self.quoteIdentifier).join(", ") + ")";
})
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!