mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-05-01 06:13:59 +00:00
Merge branch 'master' of github.com:dbgate/dbgate
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