create table add column comment (#2298)

This commit is contained in:
haoc7 2019-03-10 20:01:57 +08:00 committed by Jinzhu
parent d7ef7871a4
commit c721a198a7
1 changed files with 4 additions and 0 deletions

View File

@ -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)
}