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

Commit 9ddb152e by Mick Hansen

Merge pull request #5674 from xkjyeah/master

Use transaction when creating index
2 parents 38174df0 865edc6e
Showing with 6 additions and 1 deletions
...@@ -1020,7 +1020,12 @@ Model.prototype.sync = function(options) { ...@@ -1020,7 +1020,12 @@ Model.prototype.sync = function(options) {
}); });
return Promise.map(indexes, function (index) { 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 () { }).then(function () {
if (options.hooks) { if (options.hooks) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!