We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 22036f5 commit 7f4b498Copy full SHA for 7f4b498
ddlmod.go
@@ -134,7 +134,9 @@ func parseDDL(strs ...string) (*ddl, error) {
134
columnType.PrimaryKeyValue = sql.NullBool{Bool: true, Valid: true}
135
}
136
if defaultMatches := defaultValueRegexp.FindStringSubmatch(matches[3]); len(defaultMatches) > 1 {
137
- columnType.DefaultValueValue = sql.NullString{String: strings.Trim(defaultMatches[1], `"`), Valid: true}
+ if strings.ToLower(defaultMatches[1]) != "null" {
138
+ columnType.DefaultValueValue = sql.NullString{String: strings.Trim(defaultMatches[1], `"`), Valid: true}
139
+ }
140
141
142
// data type length
0 commit comments