begin;

alter table t_user add column `star_num` int(11) NOT NULL DEFAULT '0' COMMENT '星星数(成长任务)';
ALTER TABLE t_user MODIFY COLUMN hero_id bigint NOT NULL DEFAULT '0' COMMENT '当前上阵英雄唯一id';
ALTER TABLE t_hero_preset MODIFY COLUMN hero_uid bigint NOT NULL DEFAULT '0' COMMENT 'hero uniid';
ALTER TABLE t_hero_preset MODIFY COLUMN weapon_uid1 bigint NOT NULL DEFAULT '0' COMMENT 'gun uniid1';
ALTER TABLE t_hero_preset MODIFY COLUMN weapon_uid2 bigint NOT NULL DEFAULT '0' COMMENT 'gun uniid2';

CREATE TABLE `t_mission_star` (
  `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id',
  `season_id` int(11) NOT NULL DEFAULT '0' COMMENT '成长任务赛季id',
  `mission_id` int(11) NOT NULL DEFAULT '0' COMMENT '成长任务id',
  `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
  `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
  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;

CREATE TABLE `t_user_sign_log` (
  `idx` int(10) NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id',
  `days` int(10) DEFAULT '0' COMMENT '累计签到天数',
  `sign_time` int(10) DEFAULT NULL COMMENT '签到时间',
  `is_receive` tinyint(4) 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=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

insert into version (version) values(2023060801);

commit;
