Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incorrect type for mysql int/bigint field #86

Open
epiphyllum opened this issue Mar 15, 2019 · 2 comments
Open

incorrect type for mysql int/bigint field #86

epiphyllum opened this issue Mar 15, 2019 · 2 comments

Comments

@epiphyllum
Copy link

db:query("select * from t_batch where id = 1")

i get a row: where: id, orgid become a string

drop table if exists `t_batch`;
create table `t_batch` (
  `id` bigint not null auto_increment,
  `orgid` bigint not null comment '机构id',
  `mid` bigint not null comment '商户id',
  `batchno` bigint not null comment '批次号',
  `amt` decimal(11,2) null comment '批次汇总金额',
  `status` smallint not null default 0 comment '0: 未处理  1:处理完毕',
  `deadline` timestamp not null comment '在什么时间之前处理',
  `memo` varchar(256) null comment '处理备注',
  `tsc` timestamp not null default current_timestamp comment '记录创建时间',
  `tsu` timestamp null default current_timestamp on update current_timestamp comment '记录最后修改时间',
  primary key (`id`),
    unique key key_1 (mid, batchno)
@epiphyllum
Copy link
Author

but for smallint , when i get a row. the variable is not string.

@tvlc
Copy link

tvlc commented Feb 21, 2022

Any fix planned? Issue still persists

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants