| | |
| | | _fieldlen = _f.decimal ? _f.decimal : 0 |
| | | } |
| | | |
| | | if (_fieldlen > 2048) { |
| | | _fieldlen = 'max' |
| | | } |
| | | |
| | | let _type = `nvarchar(${_fieldlen})` |
| | | |
| | | if (_f.type.match(/date/ig)) { |
| | |
| | | |
| | | _usefulfields.push(_f.field) |
| | | |
| | | let _type = `nvarchar(${_f.fieldlength || 50})` |
| | | let _fieldlen = _f.fieldlength || 50 |
| | | |
| | | if (_f.type === 'picture' || _f.type === 'textarea') { |
| | | _fieldlen = _f.fieldlength || 512 |
| | | } |
| | | |
| | | if (_fieldlen > 2048) { |
| | | _fieldlen = 'max' |
| | | } |
| | | |
| | | let _type = `nvarchar(${_fieldlen})` |
| | | |
| | | if (_f.type === 'number') { |
| | | _type = `decimal(18,${_f.decimal ? _f.decimal : 0})` |
| | | } else if (_f.type === 'picture' || _f.type === 'textarea') { |
| | | _type = `nvarchar(${_f.fieldlength || 512})` |
| | | _type = `nvarchar(${_fieldlen})` |
| | | } |
| | | |
| | | if (_f.type === 'number') { |
| | |
| | | _fieldlen = _f.decimal ? _f.decimal : 0 |
| | | } |
| | | |
| | | if (_fieldlen > 2048) { |
| | | _fieldlen = 'max' |
| | | } |
| | | |
| | | let _type = `nvarchar(${_fieldlen})` |
| | | |
| | | if (_f.type.match(/date/ig)) { |
| | |
| | | |
| | | _usefulfields.push(_f.field) |
| | | |
| | | let _type = `nvarchar(${_f.fieldlength || 50})` |
| | | let _fieldlen = _f.fieldlength || 50 |
| | | |
| | | if (_f.type === 'picture' || _f.type === 'textarea') { |
| | | _fieldlen = _f.fieldlength || 512 |
| | | } |
| | | |
| | | if (_fieldlen > 2048) { |
| | | _fieldlen = 'max' |
| | | } |
| | | |
| | | let _type = `nvarchar(${_fieldlen})` |
| | | |
| | | if (_f.type === 'number') { |
| | | _type = `decimal(18,${_f.decimal ? _f.decimal : 0})` |
| | | } else if (_f.type === 'picture' || _f.type === 'textarea') { |
| | | _type = `nvarchar(${_f.fieldlength || 512})` |
| | | _type = `nvarchar(${_fieldlen})` |
| | | } |
| | | |
| | | if (_f.type === 'number') { |
| | |
| | | |
| | | _usefulfields.push(_f.field) |
| | | |
| | | let _type = `nvarchar(${_f.fieldlength || 50})` |
| | | let _fieldlen = _f.fieldlength || 50 |
| | | |
| | | if (_f.type === 'picture' || _f.type === 'textarea') { |
| | | _fieldlen = _f.fieldlength || 512 |
| | | } |
| | | |
| | | if (_fieldlen > 2048) { |
| | | _fieldlen = 'max' |
| | | } |
| | | |
| | | let _type = `nvarchar(${_fieldlen})` |
| | | |
| | | if (_f.type === 'number') { |
| | | _type = `decimal(18,${_f.decimal ? _f.decimal : 0})` |
| | | } else if (_f.type === 'picture' || _f.type === 'textarea') { |
| | | _type = `nvarchar(${_f.fieldlength || 512})` |
| | | _type = `nvarchar(${_fieldlen})` |
| | | } |
| | | |
| | | if (_f.type === 'number') { |