Skip to content
This repository has been archived by the owner on Sep 7, 2021. It is now read-only.
This repository is currently being migrated. It's locked while the migration is in progress.

Commit

Permalink
fix default on postgres
Browse files Browse the repository at this point in the history
  • Loading branch information
lunny committed Sep 28, 2019
1 parent 3c9bea0 commit 1a7ddf8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dialect_postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -1045,7 +1045,7 @@ WHERE c.relkind = 'r'::char AND c.relname = $1%s AND f.attnum > 0 ORDER BY f.att

col.Length = maxLen

if !col.DefaultIsEmpty && (col.SQLType.IsText() || col.SQLType.IsTime()) {
if !col.DefaultIsEmpty && col.SQLType.IsText() {
if strings.HasSuffix(col.Default, "::character varying") {
col.Default = strings.TrimRight(col.Default, "::character varying")
} else if !strings.HasPrefix(col.Default, "'") {
Expand Down

0 comments on commit 1a7ddf8

Please sign in to comment.