29 lines
1.3 KiB
PL/PgSQL
29 lines
1.3 KiB
PL/PgSQL
begin;
|
|
|
|
CREATE TABLE `t_user_invitation_code` (
|
|
`idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
|
|
`account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id(channel + "_" + gameid + "_" + openid)',
|
|
`invitation_code` varchar(60) CHARACTER SET utf8 COMMENT '邀请码',
|
|
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
|
|
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
|
|
PRIMARY KEY (`idx`),
|
|
UNIQUE KEY `account_id` (`account_id`),
|
|
UNIQUE KEY `invitation_code` (`invitation_code`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
|
|
|
|
|
CREATE TABLE `t_user_invitation_code_bind` (
|
|
`idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
|
|
`account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id(channel + "_" + gameid + "_" + openid)',
|
|
`invitation_code` varchar(60) CHARACTER SET utf8 COMMENT '邀请码',
|
|
`reward_state` int(11) NOT NULL DEFAULT '0' COMMENT '奖励0:未领 1:已领',
|
|
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
|
|
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
|
|
PRIMARY KEY (`idx`),
|
|
UNIQUE KEY `account_id` (`account_id`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
|
|
|
insert into version (version) values(2024092401);
|
|
|
|
commit;
|