game2006api/sql/gamedb2006_migrate_241001_01.sql
aozhiwei 229550dde8 1
2024-10-10 15:26:43 +08:00

37 lines
1.9 KiB
PL/PgSQL

begin;
alter table t_hero add column `gold_times` int(11) NOT NULL DEFAULT '0' COMMENT '打金次数';
alter table t_hero add column `gold_modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '打金时间';
CREATE TABLE `t_user_bind_gold_record` (
`idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
`account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id(channel + "_" + gameid + "_" + openid)',
`way` int(11) NOT NULL DEFAULT '0' COMMENT '1:draw 2:open',
`amount` int(11) NOT NULL DEFAULT '0' COMMENT '绑币数量',
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
PRIMARY KEY (`idx`)
) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
CREATE TABLE `t_hashrate_shop_buy_record` (
`idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
`account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id',
`goods_id` int(11) NOT NULL DEFAULT '0' COMMENT '商品id',
`item_id` int(11) NOT NULL DEFAULT '0' COMMENT '道具id',
`this_day_buy_times` int(11) NOT NULL DEFAULT '0' COMMENT '今日购买次数',
`this_week_buy_times` int(11) NOT NULL DEFAULT '0' COMMENT '本周购买次数',
`this_month_buy_times` int(11) NOT NULL DEFAULT '0' COMMENT '本月购买次数',
`total_buy_times` int(11) NOT NULL DEFAULT '0' COMMENT '总购买次数',
`last_buy_time` int(11) NOT NULL DEFAULT '0' COMMENT '最后一次购买时间',
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
PRIMARY KEY (`idx`),
KEY `account_id` (`account_id`),
UNIQUE KEY `account_id_goods_id` (`account_id`, `goods_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
insert into version (version) values(2024092401);
commit;