Skip to content

Commit

Permalink
fix: int default tag without quote
Browse files Browse the repository at this point in the history
  • Loading branch information
tr1v3r committed Apr 21, 2022
1 parent 4f77776 commit fc51ef6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/model/tbl_column.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ func (c *Column) defaultValue() string {
if !ok {
return ""
}
if typ := c.DatabaseTypeName(); strings.Contains(typ, "int") || typ == "numeric" {
return df
}
return "'" + df + "'"
}

Expand Down

0 comments on commit fc51ef6

Please sign in to comment.