Add precision/scale for sync discovery

This commit is contained in:
Raymond Feng 2013-07-25 15:20:19 -07:00
parent dcada03c43
commit 1109f671da
1 changed files with 5 additions and 1 deletions

View File

@ -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
};
});