1
This commit is contained in:
parent
7d38cb3509
commit
277c87e01e
30
sql/gamedb2001_n_migrate_190829_01.sql
Normal file
30
sql/gamedb2001_n_migrate_190829_01.sql
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
begin;
|
||||||
|
|
||||||
|
CREATE TABLE `redpack` (
|
||||||
|
`idx` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
|
||||||
|
`red_type` int(11) NOT NULL DEFAULT '0' COMMENT '红包类型(1:红包雨红包,2:邀请好友红包)',
|
||||||
|
`red_sum` double NOT NULL DEFAULT '0' COMMENT '红包金额(已发放的)',
|
||||||
|
`red_date` int(11) NOT NULL DEFAULT '0' COMMENT '日期(某天时间的00:00:00)',
|
||||||
|
`create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
|
||||||
|
`modify_time` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
|
||||||
|
PRIMARY KEY (`idx`),
|
||||||
|
UNIQUE KEY `red_type_red_date` (`red_type`, `red_date`)
|
||||||
|
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
||||||
|
|
||||||
|
CREATE TABLE `redpack_log` (
|
||||||
|
`idx` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
|
||||||
|
`accountid` varchar(60) DEFAULT '' COMMENT '账号id(channel + "_" + gameid + "_" + openid)',
|
||||||
|
`order_id` varchar(60) DEFAULT '' COMMENT '订单id',
|
||||||
|
`get_time` int(11) NOT NULL DEFAULT '0' COMMENT '领取时间',
|
||||||
|
`coin_num` int(11) NOT NULL DEFAULT '0' COMMENT '金钱数量',
|
||||||
|
`custom_data` mediumblob COMMENT '其他字段',
|
||||||
|
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
|
||||||
|
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
|
||||||
|
PRIMARY KEY (`idx`),
|
||||||
|
UNIQUE KEY `account_order_id_get_time` (`accountid`, `order_id` , `get_time`)
|
||||||
|
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
||||||
|
|
||||||
|
|
||||||
|
insert into version (version) values(2019082901);
|
||||||
|
|
||||||
|
commit;
|
Loading…
x
Reference in New Issue
Block a user