We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9e7a2bb commit 6145461Copy full SHA for 6145461
migrator.go
@@ -34,6 +34,17 @@ where
34
and t.relname = ?
35
`
36
37
+var typeAliasMap = map[string][]string{
38
+ "int2": {"smallint"},
39
+ "int4": {"integer"},
40
+ "int8": {"bigint"},
41
+ "smallint": {"int2"},
42
+ "integer": {"int4"},
43
+ "bigint": {"int8"},
44
+ "decimal": {"numeric"},
45
+ "numeric": {"decimal"},
46
+}
47
+
48
type Migrator struct {
49
migrator.Migrator
50
}
@@ -676,3 +687,7 @@ func groupByIndexName(indexList []*Index) map[string][]*Index {
676
687
677
688
return columnIndexMap
678
689
690
691
+func (m Migrator) GetTypeAliases(databaseTypeName string) []string {
692
+ return typeAliasMap[databaseTypeName]
693
0 commit comments