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,
|
||||
}) {
|
||||
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,
|
||||
|
Loading…
Reference in New Issue
Block a user