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

Commit 865edc6e by daniel sim

Use transaction when creating index

1 parent 1ba6f163
Showing with 6 additions and 1 deletions
......@@ -1020,7 +1020,12 @@ Model.prototype.sync = function(options) {
});
return Promise.map(indexes, function (index) {
return self.QueryInterface.addIndex(self.getTableName(options), _.assign({logging: options.logging, benchmark: options.benchmark}, index), self.tableName);
return self.QueryInterface.addIndex(
self.getTableName(options),
_.assign({logging: options.logging,
benchmark: options.benchmark,
transaction: options.transaction}, index),
self.tableName);
});
}).then(function () {
if (options.hooks) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!