From 64cfb9ee01facad6dcaf4b107aff6d5fc7a6a912 Mon Sep 17 00:00:00 2001 From: bitmage Date: Thu, 3 May 2012 10:28:08 -0700 Subject: [PATCH] added double quotes to field names --- lib/adapters/postgres.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/adapters/postgres.js b/lib/adapters/postgres.js index aff215c3..c57f7e0b 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 = \''+ self.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); }); });