This commit is contained in:
Lunny Xiao 2021-08-08 17:53:19 +08:00
parent 7fad82724b
commit 0837c9a4a8
1 changed files with 2 additions and 2 deletions

View File

@ -953,8 +953,8 @@ func (db *dameng) GetColumns(queryer core.Queryer, ctx context.Context, tableNam
col.Length = int(dataLen.Int64)
}
if col.SQLType.IsText() || col.SQLType.IsTime() {
if !col.DefaultIsEmpty {
if col.SQLType.IsTime() {
if !col.DefaultIsEmpty && !strings.EqualFold(col.Default, "CURRENT_TIMESTAMP") {
col.Default = addSingleQuote(col.Default)
}
}