-
Notifications
You must be signed in to change notification settings - Fork 174
/
import_stats.sql
79 lines (76 loc) · 3.81 KB
/
import_stats.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
DROP TABLE IF EXISTS `get5_stats_players`;
DROP TABLE IF EXISTS `get5_stats_maps`;
DROP TABLE IF EXISTS `get5_stats_matches`;
CREATE TABLE `get5_stats_matches`
(
`matchid` int(10) unsigned NOT NULL AUTO_INCREMENT,
`start_time` datetime NOT NULL,
`end_time` datetime NULL DEFAULT NULL,
`winner` varchar(16) NOT NULL DEFAULT '',
`series_type` varchar(64) NOT NULL DEFAULT '',
`team1_name` varchar(64) NOT NULL DEFAULT '',
`team1_score` smallint(5) unsigned NOT NULL DEFAULT '0',
`team2_name` varchar(64) NOT NULL DEFAULT '',
`team2_score` smallint(5) unsigned NOT NULL DEFAULT '0',
`server_id` varchar(64) NOT NULL DEFAULT '0',
PRIMARY KEY (`matchid`),
KEY `server_id` (`server_id`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4;
CREATE TABLE `get5_stats_maps`
(
`matchid` int(10) unsigned NOT NULL,
`mapnumber` tinyint(3) unsigned NOT NULL,
`start_time` datetime NOT NULL,
`end_time` datetime NULL DEFAULT NULL,
`winner` varchar(16) NOT NULL DEFAULT '',
`mapname` varchar(64) NOT NULL DEFAULT '',
`team1_score` smallint(5) unsigned NOT NULL DEFAULT '0',
`team2_score` smallint(5) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`matchid`, `mapnumber`),
CONSTRAINT `get5_stats_maps_matchid` FOREIGN KEY (`matchid`) REFERENCES `get5_stats_matches` (`matchid`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4;
CREATE TABLE `get5_stats_players`
(
`matchid` int(10) unsigned NOT NULL,
`mapnumber` tinyint(3) unsigned NOT NULL,
`steamid64` bigint(21) unsigned NOT NULL,
`team` varchar(16) NOT NULL DEFAULT '',
`rounds_played` smallint(5) unsigned NOT NULL,
`name` varchar(64) NOT NULL,
`kills` smallint(5) unsigned NOT NULL,
`deaths` smallint(5) unsigned NOT NULL,
`assists` smallint(5) unsigned NOT NULL,
`flashbang_assists` smallint(5) unsigned NOT NULL,
`teamkills` smallint(5) unsigned NOT NULL,
`knife_kills` smallint(5) unsigned NOT NULL,
`headshot_kills` smallint(5) unsigned NOT NULL,
`damage` int(10) unsigned NOT NULL,
`utility_damage` smallint(5) unsigned NOT NULL,
`enemies_flashed` smallint(5) unsigned NOT NULL,
`friendlies_flashed` smallint(5) unsigned NOT NULL,
`bomb_plants` smallint(5) unsigned NOT NULL,
`bomb_defuses` smallint(5) unsigned NOT NULL,
`v1` smallint(5) unsigned NOT NULL,
`v2` smallint(5) unsigned NOT NULL,
`v3` smallint(5) unsigned NOT NULL,
`v4` smallint(5) unsigned NOT NULL,
`v5` smallint(5) unsigned NOT NULL,
`2k` smallint(5) unsigned NOT NULL,
`3k` smallint(5) unsigned NOT NULL,
`4k` smallint(5) unsigned NOT NULL,
`5k` smallint(5) unsigned NOT NULL,
`firstkill_t` smallint(5) unsigned NOT NULL,
`firstkill_ct` smallint(5) unsigned NOT NULL,
`firstdeath_t` smallint(5) unsigned NOT NULL,
`firstdeath_ct` smallint(5) unsigned NOT NULL,
`tradekill` smallint(5) unsigned NOT NULL,
`kast` smallint(5) unsigned NOT NULL,
`contribution_score` smallint(5) unsigned NOT NULL,
`mvp` smallint(5) unsigned NOT NULL,
PRIMARY KEY (`matchid`, `mapnumber`, `steamid64`),
KEY `steamid64` (`steamid64`),
CONSTRAINT `get5_stats_players_matchid` FOREIGN KEY (`matchid`) REFERENCES `get5_stats_matches` (`matchid`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4;