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