修改数据库

master
ELF 5 years ago
parent 1e8735f173
commit 12fd7ac4e9

@ -716,10 +716,11 @@ INSERT INTO `sys_menu`(`title`, `pid`, `sort`, `url`, `hide`, `tip`, `group`, `i
ALTER TABLE `tab_game`
ADD COLUMN `flooring_page_video_cover` int(11) NOT NULL DEFAULT 0 COMMENT '落地页视频封面';
CREATE TABLE `tab_user_retention` (
CREATE TABLE `tab_player_retention` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) not null COMMENT '用户ID',
`game_id` int(11) NOT NULL COMMENT '游戏ID',
`player_id` int(11) NOT NULL COMMENT '玩家ID',
`day1` tinyint(1) NOT NULL default 0 COMMENT '是否1日留存',
`day2` tinyint(1) NOT NULL default 0 COMMENT '是否2日留存',
`day3` tinyint(1) NOT NULL default 0 COMMENT '是否3日留存',
@ -730,6 +731,12 @@ CREATE TABLE `tab_user_retention` (
`day15` tinyint(1) NOT NULL default 0 COMMENT '是否15日留存',
`day30` tinyint(1) NOT NULL default 0 COMMENT '是否30日留存',
PRIMARY KEY (`id`),
KEY `game_id` (`game_id`),
KEY `user_id` (`user_id`),
KEY `index_game_id` (`game_id`),
KEY `index_user_id` (`user_id`),
KEY `index_player_id` (`player_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户留存率';
-- 玩家注册时间
ALTER TABLE `tab_user_play`
ADD COLUMN `create_time` int(11) NOT NULL DEFAULT 0 COMMENT '玩家注册时间';
update tab_user_play a left join tab_user b on a.user_id= b.id set a.create_time = b.register_time where a.user_id=b.id;
Loading…
Cancel
Save