sync2命令执行时number(36,2)类型字段出现不应该的警告 #1831

Closed
opened 2020-11-16 06:44:45 +00:00 by zhengdx · 1 comment

当前我使用postgre数据库

字段定义如下

Qty float64 xorm:"numeric(36,2)"

然后这样的定义使用sync2创建数据表

然后再次执行时,出现下面的警告

[xorm] [warn] 2020/11/16 14:33:07.833650 Table xxx column Qty db type is NUMERIC, struct type is NUMERIC(32,6)

当前我使用postgre数据库 字段定义如下 Qty float64 `xorm:"numeric(36,2)"` 然后这样的定义使用sync2创建数据表 然后再次执行时,出现下面的警告 [xorm] [warn] 2020/11/16 14:33:07.833650 Table xxx column Qty db type is NUMERIC, struct type is NUMERIC(32,6)
lunny added the
kind
bug
label 2021-06-12 07:40:12 +00:00
Owner

numeric is an alias of decimal on postgres, so when you create a type of numeric, postgres will return decimal.

numeric is an alias of decimal on postgres, so when you create a type of numeric, postgres will return `decimal`.
lunny added this to the 1.2.0 milestone 2021-06-12 08:14:05 +00:00
lunny closed this issue 2021-07-07 09:09:41 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: xorm/xorm#1831
No description provided.