mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-17 23:45:59 +00:00
mssql: fix (varchar(-1) => varchar(max))
This commit is contained in:
@@ -36,9 +36,12 @@ function getColumnInfo({
|
||||
defaultConstraint,
|
||||
}) {
|
||||
let fullDataType = dataType;
|
||||
if (charMaxLength && isTypeString(dataType)) fullDataType = `${dataType}(${charMaxLength})`;
|
||||
if (numericPrecision && numericScale && isTypeNumeric(dataType))
|
||||
if (charMaxLength && isTypeString(dataType)) {
|
||||
fullDataType = `${dataType}(${charMaxLength < 0 ? 'MAX' : charMaxLength})`;
|
||||
}
|
||||
if (numericPrecision && numericScale && isTypeNumeric(dataType)) {
|
||||
fullDataType = `${dataType}(${numericPrecision},${numericScale})`;
|
||||
}
|
||||
return {
|
||||
columnName,
|
||||
dataType: fullDataType,
|
||||
|
||||
Reference in New Issue
Block a user