From 1109f671dac491935ee6f5d5bdacc78f16b5fe0d Mon Sep 17 00:00:00 2001 From: Raymond Feng Date: Thu, 25 Jul 2013 15:20:19 -0700 Subject: [PATCH] Add precision/scale for sync discovery --- lib/datasource.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/datasource.js b/lib/datasource.js index f4a250ae..cd391d84 100644 --- a/lib/datasource.js +++ b/lib/datasource.js @@ -836,7 +836,9 @@ DataSource.prototype.discoverSchemasSync = function (modelName, options) { schema.properties[propName] = { type: item.type, required: (item.nullable === 'N'), - length: item.dataLength + length: item.dataLength, + precision: item.dataPrecision, + scale: item.dataScale }; if (pks[item.columnName]) { @@ -846,6 +848,8 @@ DataSource.prototype.discoverSchemasSync = function (modelName, options) { columnName: i.columnName, dataType: i.dataType, dataLength: i.dataLength, + dataPrecision: item.dataPrecision, + dataScale: item.dataScale, nullable: i.nullable }; });