fix column default value be empty (#59)
This commit is contained in:
parent
4e5be27089
commit
909f0a5fef
|
@ -37,7 +37,7 @@ type Column struct {
|
||||||
IsDeleted bool
|
IsDeleted bool
|
||||||
IsCascade bool
|
IsCascade bool
|
||||||
IsVersion bool
|
IsVersion bool
|
||||||
DefaultIsEmpty bool
|
DefaultIsEmpty bool // false means column has no default set, but not default value is empty
|
||||||
EnumOptions map[string]int
|
EnumOptions map[string]int
|
||||||
SetOptions map[string]int
|
SetOptions map[string]int
|
||||||
DisableTimeZone bool
|
DisableTimeZone bool
|
||||||
|
@ -65,7 +65,7 @@ func NewColumn(name, fieldName string, sqlType SQLType, len1, len2 int, nullable
|
||||||
IsDeleted: false,
|
IsDeleted: false,
|
||||||
IsCascade: false,
|
IsCascade: false,
|
||||||
IsVersion: false,
|
IsVersion: false,
|
||||||
DefaultIsEmpty: false,
|
DefaultIsEmpty: true, // default should be no default
|
||||||
EnumOptions: make(map[string]int),
|
EnumOptions: make(map[string]int),
|
||||||
Comment: "",
|
Comment: "",
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue