mirror of https://github.com/go-gorm/gorm.git
create table add column comment (#2298)
This commit is contained in:
parent
d7ef7871a4
commit
c721a198a7
|
@ -126,6 +126,10 @@ var ParseFieldStructForDialect = func(field *StructField, dialect Dialect) (fiel
|
|||
additionalType = additionalType + " DEFAULT " + value
|
||||
}
|
||||
|
||||
if value, ok := field.TagSettingsGet("COMMENT"); ok {
|
||||
additionalType = additionalType + " COMMENT " + value
|
||||
}
|
||||
|
||||
return fieldValue, dataType, size, strings.TrimSpace(additionalType)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue