fix column default value be empty #59

Merged
lunny merged 1 commits from lunny/col_default into master 2019-11-13 11:09:24 +00:00

View File

@ -37,7 +37,7 @@ type Column struct {
IsDeleted bool
IsCascade bool
IsVersion bool
DefaultIsEmpty bool
DefaultIsEmpty bool // false means column has no default set, but not default value is empty
EnumOptions map[string]int
SetOptions map[string]int
DisableTimeZone bool
@ -65,7 +65,7 @@ func NewColumn(name, fieldName string, sqlType SQLType, len1, len2 int, nullable
IsDeleted: false,
IsCascade: false,
IsVersion: false,
DefaultIsEmpty: false,
DefaultIsEmpty: true, // default should be no default
EnumOptions: make(map[string]int),
Comment: "",
}