This commit is contained in:
aozhiwei 2023-06-05 16:39:24 +08:00
parent fdd2e16fb7
commit 880d0fd12e
2 changed files with 11 additions and 1 deletions

View File

@ -30,6 +30,7 @@ CREATE TABLE `t_user` (
`idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
`account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id(channel + "_" + gameid + "_" + openid)',
`channel` int(11) NOT NULL DEFAULT '0' COMMENT 'channel',
`address` varchar(60) COMMENT 'address',
`name` tinyblob COMMENT '用户名字',
`sex` int(11) NOT NULL DEFAULT '0' COMMENT '性别',
`head_id` int(11) NOT NULL DEFAULT '0' COMMENT '头像id',
@ -70,6 +71,7 @@ CREATE TABLE `t_user` (
`star_num` int(11) NOT NULL DEFAULT '0' COMMENT '星星数(成长任务)',
PRIMARY KEY (`idx`),
UNIQUE KEY `account_id` (`account_id`),
UNIQUE KEY `address` (`address`),
KEY `channel` (`channel`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
@ -1089,4 +1091,4 @@ CREATE TABLE `t_mission_star` (
PRIMARY KEY (`idx`),
UNIQUE KEY `account_season_mission_id` (`account_id`, `season_id`, `mission_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40101 SET character_set_client = @saved_cs_client */;

View File

@ -0,0 +1,8 @@
begin;
alter table t_user add column `address` varchar(60) COMMENT 'address';
alter table t_user add KEY `address` (`address`);
insert into version (version) values(2023060501);
commit;