From 1a7ddf84c2c191e9fecac0260642b111d45734ab Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Sat, 28 Sep 2019 21:15:09 +0800 Subject: [PATCH] fix default on postgres --- dialect_postgres.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dialect_postgres.go b/dialect_postgres.go index aa17ac318..6b2da93e7 100644 --- a/dialect_postgres.go +++ b/dialect_postgres.go @@ -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, "'") {