Fix async.each in migration (#262)
This commit is contained in:
parent
f2f0dac69d
commit
70f0acadd4
|
@ -58,7 +58,7 @@ function mixinMigration(MySQL, mysql) {
|
|||
|
||||
models = models || Object.keys(this._models);
|
||||
|
||||
async.each(models, function(model, done) {
|
||||
async.eachSeries(models, function(model, done) {
|
||||
if (!(model in self._models)) {
|
||||
return process.nextTick(function() {
|
||||
done(new Error(g.f('Model not found: %s', model)));
|
||||
|
@ -136,7 +136,7 @@ function mixinMigration(MySQL, mysql) {
|
|||
|
||||
models = models || Object.keys(this._models);
|
||||
|
||||
async.each(models, function(model, done) {
|
||||
async.eachSeries(models, function(model, done) {
|
||||
self.getTableStatus(model, function(err, fields, indexes) {
|
||||
self.discoverForeignKeys(self.table(model), {}, function(err, foreignKeys) {
|
||||
if (err) console.log('Failed to discover "' + table + '" foreign keys', err);
|
||||
|
|
Loading…
Reference in New Issue