Allow more flavors of nullable values from DB discovery

This commit is contained in:
Raymond Feng 2014-12-03 15:10:13 -08:00
parent 48e8ebed7b
commit 6914733a41
1 changed files with 2 additions and 1 deletions

View File

@ -1245,7 +1245,8 @@ DataSource.prototype.discoverSchemas = function (modelName, options, cb) {
var propName = fromDBName(item.columnName, true);
schema.properties[propName] = {
type: item.type,
required: (item.nullable === 'N'),
required: (item.nullable === 'N' || item.nullable === 'NO'
|| item.nullable === 0 || item.nullable === false),
length: item.dataLength,
precision: item.dataPrecision,
scale: item.dataScale