Skip to content

Commit 27eff96

Browse files
author
Lasse Hyldahl Jensen
authored
Add missing postgres type aliases (#270)
1 parent d1db251 commit 27eff96

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

migrator.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ WHERE
3838
`
3939

4040
var typeAliasMap = map[string][]string{
41+
"int": {"integer"},
4142
"int2": {"smallint"},
4243
"int4": {"integer"},
4344
"int8": {"bigint"},
@@ -50,6 +51,15 @@ var typeAliasMap = map[string][]string{
5051
"timestamp with time zone": {"timestamptz"},
5152
"bool": {"boolean"},
5253
"boolean": {"bool"},
54+
"serial2": {"smallserial"},
55+
"serial4": {"serial"},
56+
"serial8": {"bigserial"},
57+
"varbit": {"bit varying"},
58+
"char": {"character"},
59+
"varchar": {"character varying"},
60+
"float4": {"real"},
61+
"float8": {"double precision"},
62+
"timetz": {"time with time zone"},
5363
}
5464

5565
type Migrator struct {

0 commit comments

Comments
 (0)