diff --git a/lib/adapters/postgres.js b/lib/adapters/postgres.js index bbc3d46f..7cbcacd3 100644 --- a/lib/adapters/postgres.js +++ b/lib/adapters/postgres.js @@ -274,7 +274,7 @@ PG.prototype.autoupdate = function (cb) { var wait = 0; Object.keys(this._models).forEach(function (model) { wait += 1; - self.query('SELECT column_name as Field, udt_name as Type, is_nullable as Null, column_default as Default FROM information_schema.COLUMNS WHERE table_name = \''+ this.table(model) + '\'', function (err, fields) { + self.query('SELECT column_name as Field, udt_name as Type, is_nullable as Null, column_default as Default FROM information_schema.COLUMNS WHERE table_name = \''+ self.table(model) + '\'', function (err, fields) { self.alterTable(model, fields, done); }); });