Fix async.each in migration (#262)

This commit is contained in:
Benjamin Schuster-Boeckler 2017-04-18 17:48:55 +01:00 committed by Sakib Hasan
parent f2f0dac69d
commit 70f0acadd4
1 changed files with 2 additions and 2 deletions

View File

@ -58,7 +58,7 @@ function mixinMigration(MySQL, mysql) {
models = models || Object.keys(this._models); models = models || Object.keys(this._models);
async.each(models, function(model, done) { async.eachSeries(models, function(model, done) {
if (!(model in self._models)) { if (!(model in self._models)) {
return process.nextTick(function() { return process.nextTick(function() {
done(new Error(g.f('Model not found: %s', model))); done(new Error(g.f('Model not found: %s', model)));
@ -136,7 +136,7 @@ function mixinMigration(MySQL, mysql) {
models = models || Object.keys(this._models); 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.getTableStatus(model, function(err, fields, indexes) {
self.discoverForeignKeys(self.table(model), {}, function(err, foreignKeys) { self.discoverForeignKeys(self.table(model), {}, function(err, foreignKeys) {
if (err) console.log('Failed to discover "' + table + '" foreign keys', err); if (err) console.log('Failed to discover "' + table + '" foreign keys', err);