mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 20:26:23 +00:00
Merge branch 'master' of github.com:dbgate/dbgate
This commit is contained in:
commit
82304f13e7
@ -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,
|
||||||
|
Loading…
Reference in New Issue
Block a user