mirror of
https://github.com/zeromicro/go-zero.git
synced 2026-05-07 15:10:01 +08:00
fix: Fix PostgreSQL numeric type mapping in goctl model generation (#4992)
Co-authored-by: 李安琳 <anlynn@gmail.com>
This commit is contained in:
@@ -10,6 +10,9 @@ model:
|
|||||||
decimal:
|
decimal:
|
||||||
null_type: sql.NullFloat64
|
null_type: sql.NullFloat64
|
||||||
type: float64
|
type: float64
|
||||||
|
numeric:
|
||||||
|
null_type: sql.NullFloat64
|
||||||
|
type: float64
|
||||||
double:
|
double:
|
||||||
null_type: sql.NullFloat64
|
null_type: sql.NullFloat64
|
||||||
type: float64
|
type: float64
|
||||||
|
|||||||
@@ -9,8 +9,6 @@ import (
|
|||||||
|
|
||||||
var p2m = map[string]string{
|
var p2m = map[string]string{
|
||||||
"int8": "bigint",
|
"int8": "bigint",
|
||||||
"numeric": "double",
|
|
||||||
"decimal": "double",
|
|
||||||
"float8": "double",
|
"float8": "double",
|
||||||
"float4": "float",
|
"float4": "float",
|
||||||
"int2": "smallint",
|
"int2": "smallint",
|
||||||
|
|||||||
Reference in New Issue
Block a user