mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 17:16:01 +00:00
fixed mssql defaults
This commit is contained in:
@@ -51,6 +51,15 @@ function getColumnInfo({
|
||||
if (numericPrecision && numericScale && isTypeNumeric(dataType)) {
|
||||
fullDataType = `${dataType}(${numericPrecision},${numericScale})`;
|
||||
}
|
||||
|
||||
if (defaultValue) {
|
||||
defaultValue = defaultValue.trim();
|
||||
while (defaultValue.startsWith('(') && defaultValue.endsWith(')')) {
|
||||
defaultValue = defaultValue.slice(1, -1);
|
||||
defaultValue = defaultValue.trim();
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
columnName,
|
||||
dataType: fullDataType,
|
||||
|
||||
Reference in New Issue
Block a user