From 12fd7ac4e9ac0126e4b3fed6103b49e63c55ceba Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Fri, 20 Dec 2019 18:20:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=95=B0=E6=8D=AE=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Data/update.sql | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/Data/update.sql b/Data/update.sql index 3b2695945..4e720663a 100644 --- a/Data/update.sql +++ b/Data/update.sql @@ -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`), -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户留存率'; \ No newline at end of file + 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; \ No newline at end of file