Skip to content

Commit

Permalink
Add missing postgres type aliases (#270)
Browse files Browse the repository at this point in the history
  • Loading branch information
lasse-it authored Jun 12, 2024
1 parent d1db251 commit 27eff96
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions migrator.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ WHERE
`

var typeAliasMap = map[string][]string{
"int": {"integer"},
"int2": {"smallint"},
"int4": {"integer"},
"int8": {"bigint"},
Expand All @@ -50,6 +51,15 @@ var typeAliasMap = map[string][]string{
"timestamp with time zone": {"timestamptz"},
"bool": {"boolean"},
"boolean": {"bool"},
"serial2": {"smallserial"},
"serial4": {"serial"},
"serial8": {"bigserial"},
"varbit": {"bit varying"},
"char": {"character"},
"varchar": {"character varying"},
"float4": {"real"},
"float8": {"double precision"},
"timetz": {"time with time zone"},
}

type Migrator struct {
Expand Down

0 comments on commit 27eff96

Please sign in to comment.