Skip to content

Commit ba0febf

Browse files
AnlynnLee李安琳
andauthored
fix: Fix PostgreSQL numeric type mapping in goctl model generation (#4992)
Co-authored-by: 李安琳 <[email protected]>
1 parent c9ff6a1 commit ba0febf

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

tools/goctl/config/default.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ model:
1010
decimal:
1111
null_type: sql.NullFloat64
1212
type: float64
13+
numeric:
14+
null_type: sql.NullFloat64
15+
type: float64
1316
double:
1417
null_type: sql.NullFloat64
1518
type: float64

tools/goctl/model/sql/model/postgresqlmodel.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ import (
99

1010
var p2m = map[string]string{
1111
"int8": "bigint",
12-
"numeric": "double",
13-
"decimal": "double",
1412
"float8": "double",
1513
"float4": "float",
1614
"int2": "smallint",

0 commit comments

Comments
 (0)