Postgres migrations fix #54

This commit is contained in:
Anatoliy Chakkaev 2012-04-02 20:49:46 +04:00
parent 426efeabcf
commit 5c2b995cf1
1 changed files with 1 additions and 1 deletions

View File

@ -274,7 +274,7 @@ PG.prototype.autoupdate = function (cb) {
var wait = 0; var wait = 0;
Object.keys(this._models).forEach(function (model) { Object.keys(this._models).forEach(function (model) {
wait += 1; 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); self.alterTable(model, fields, done);
}); });
}); });