· 8 years ago · Feb 27, 2018, 09:30 PM
1-- MySQL dump 10.13 Distrib 5.7.21, for Linux (x86_64)
2--
3-- Host: localhost Database: get5
4-- ------------------------------------------------------
5-- Server version 5.7.21-0ubuntu0.16.04.1
6
7/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
8/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
9/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
10/*!40101 SET NAMES utf8 */;
11/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
12/*!40103 SET TIME_ZONE='+00:00' */;
13/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
14/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
15/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
16/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
17
18--
19-- Table structure for table `alembic_version`
20--
21
22DROP TABLE IF EXISTS `alembic_version`;
23/*!40101 SET @saved_cs_client = @@character_set_client */;
24/*!40101 SET character_set_client = utf8 */;
25CREATE TABLE `alembic_version` (
26 `version_num` varchar(32) NOT NULL
27) ENGINE=InnoDB DEFAULT CHARSET=latin1;
28/*!40101 SET character_set_client = @saved_cs_client */;
29
30--
31-- Dumping data for table `alembic_version`
32--
33
34LOCK TABLES `alembic_version` WRITE;
35/*!40000 ALTER TABLE `alembic_version` DISABLE KEYS */;
36INSERT INTO `alembic_version` VALUES ('48c5a5bb98cf');
37/*!40000 ALTER TABLE `alembic_version` ENABLE KEYS */;
38UNLOCK TABLES;
39
40--
41-- Table structure for table `game_server`
42--
43
44DROP TABLE IF EXISTS `game_server`;
45/*!40101 SET @saved_cs_client = @@character_set_client */;
46/*!40101 SET character_set_client = utf8 */;
47CREATE TABLE `game_server` (
48 `id` int(11) NOT NULL AUTO_INCREMENT,
49 `user_id` int(11) DEFAULT NULL,
50 `in_use` tinyint(1) DEFAULT NULL,
51 `ip_string` varchar(32) DEFAULT NULL,
52 `port` int(11) DEFAULT NULL,
53 `rcon_password` varchar(32) DEFAULT NULL,
54 `display_name` varchar(32) DEFAULT NULL,
55 `public_server` tinyint(1) DEFAULT NULL,
56 PRIMARY KEY (`id`),
57 KEY `user_id` (`user_id`),
58 CONSTRAINT `game_server_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`)
59) ENGINE=InnoDB DEFAULT CHARSET=latin1;
60/*!40101 SET character_set_client = @saved_cs_client */;
61
62--
63-- Dumping data for table `game_server`
64--
65
66LOCK TABLES `game_server` WRITE;
67/*!40000 ALTER TABLE `game_server` DISABLE KEYS */;
68/*!40000 ALTER TABLE `game_server` ENABLE KEYS */;
69UNLOCK TABLES;
70
71--
72-- Table structure for table `map_stats`
73--
74
75DROP TABLE IF EXISTS `map_stats`;
76/*!40101 SET @saved_cs_client = @@character_set_client */;
77/*!40101 SET character_set_client = utf8 */;
78CREATE TABLE `map_stats` (
79 `id` int(11) NOT NULL AUTO_INCREMENT,
80 `match_id` int(11) DEFAULT NULL,
81 `map_number` int(11) DEFAULT NULL,
82 `map_name` varchar(64) DEFAULT NULL,
83 `start_time` datetime DEFAULT NULL,
84 `end_time` datetime DEFAULT NULL,
85 `winner` int(11) DEFAULT NULL,
86 `team1_score` int(11) DEFAULT NULL,
87 `team2_score` int(11) DEFAULT NULL,
88 PRIMARY KEY (`id`),
89 KEY `match_id` (`match_id`),
90 KEY `winner` (`winner`),
91 CONSTRAINT `map_stats_ibfk_1` FOREIGN KEY (`match_id`) REFERENCES `match` (`id`),
92 CONSTRAINT `map_stats_ibfk_2` FOREIGN KEY (`winner`) REFERENCES `team` (`id`)
93) ENGINE=InnoDB DEFAULT CHARSET=latin1;
94/*!40101 SET character_set_client = @saved_cs_client */;
95
96--
97-- Dumping data for table `map_stats`
98--
99
100LOCK TABLES `map_stats` WRITE;
101/*!40000 ALTER TABLE `map_stats` DISABLE KEYS */;
102/*!40000 ALTER TABLE `map_stats` ENABLE KEYS */;
103UNLOCK TABLES;
104
105--
106-- Table structure for table `match`
107--
108
109DROP TABLE IF EXISTS `match`;
110/*!40101 SET @saved_cs_client = @@character_set_client */;
111/*!40101 SET character_set_client = utf8 */;
112CREATE TABLE `match` (
113 `id` int(11) NOT NULL AUTO_INCREMENT,
114 `user_id` int(11) DEFAULT NULL,
115 `server_id` int(11) DEFAULT NULL,
116 `team1_id` int(11) DEFAULT NULL,
117 `team2_id` int(11) DEFAULT NULL,
118 `winner` int(11) DEFAULT NULL,
119 `cancelled` tinyint(1) DEFAULT NULL,
120 `start_time` datetime DEFAULT NULL,
121 `end_time` datetime DEFAULT NULL,
122 `max_maps` int(11) DEFAULT NULL,
123 `title` varchar(60) DEFAULT NULL,
124 `skip_veto` tinyint(1) DEFAULT NULL,
125 `api_key` varchar(32) DEFAULT NULL,
126 `veto_mappool` varchar(160) DEFAULT NULL,
127 `team1_score` int(11) DEFAULT NULL,
128 `team2_score` int(11) DEFAULT NULL,
129 `team1_string` varchar(32) DEFAULT NULL,
130 `team2_string` varchar(32) DEFAULT NULL,
131 `forfeit` tinyint(1) DEFAULT NULL,
132 `plugin_version` varchar(32) DEFAULT NULL,
133 PRIMARY KEY (`id`),
134 KEY `server_id` (`server_id`),
135 KEY `team1_id` (`team1_id`),
136 KEY `team2_id` (`team2_id`),
137 KEY `user_id` (`user_id`),
138 KEY `winner` (`winner`),
139 CONSTRAINT `match_ibfk_1` FOREIGN KEY (`server_id`) REFERENCES `game_server` (`id`),
140 CONSTRAINT `match_ibfk_2` FOREIGN KEY (`team1_id`) REFERENCES `team` (`id`),
141 CONSTRAINT `match_ibfk_3` FOREIGN KEY (`team2_id`) REFERENCES `team` (`id`),
142 CONSTRAINT `match_ibfk_4` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`),
143 CONSTRAINT `match_ibfk_5` FOREIGN KEY (`winner`) REFERENCES `team` (`id`)
144) ENGINE=InnoDB DEFAULT CHARSET=latin1;
145/*!40101 SET character_set_client = @saved_cs_client */;
146
147--
148-- Dumping data for table `match`
149--
150
151LOCK TABLES `match` WRITE;
152/*!40000 ALTER TABLE `match` DISABLE KEYS */;
153/*!40000 ALTER TABLE `match` ENABLE KEYS */;
154UNLOCK TABLES;
155
156--
157-- Table structure for table `player_stats`
158--
159
160DROP TABLE IF EXISTS `player_stats`;
161/*!40101 SET @saved_cs_client = @@character_set_client */;
162/*!40101 SET character_set_client = utf8 */;
163CREATE TABLE `player_stats` (
164 `id` int(11) NOT NULL AUTO_INCREMENT,
165 `match_id` int(11) DEFAULT NULL,
166 `map_id` int(11) DEFAULT NULL,
167 `team_id` int(11) DEFAULT NULL,
168 `steam_id` varchar(40) DEFAULT NULL,
169 `name` varchar(40) DEFAULT NULL,
170 `kills` int(11) DEFAULT NULL,
171 `deaths` int(11) DEFAULT NULL,
172 `roundsplayed` int(11) DEFAULT NULL,
173 `assists` int(11) DEFAULT NULL,
174 `flashbang_assists` int(11) DEFAULT NULL,
175 `teamkills` int(11) DEFAULT NULL,
176 `suicides` int(11) DEFAULT NULL,
177 `headshot_kills` int(11) DEFAULT NULL,
178 `damage` int(11) DEFAULT NULL,
179 `bomb_plants` int(11) DEFAULT NULL,
180 `bomb_defuses` int(11) DEFAULT NULL,
181 `v1` int(11) DEFAULT NULL,
182 `v2` int(11) DEFAULT NULL,
183 `v3` int(11) DEFAULT NULL,
184 `v4` int(11) DEFAULT NULL,
185 `v5` int(11) DEFAULT NULL,
186 `k1` int(11) DEFAULT NULL,
187 `k2` int(11) DEFAULT NULL,
188 `k3` int(11) DEFAULT NULL,
189 `k4` int(11) DEFAULT NULL,
190 `k5` int(11) DEFAULT NULL,
191 `firstdeath_Ct` int(11) DEFAULT NULL,
192 `firstdeath_t` int(11) DEFAULT NULL,
193 `firstkill_ct` int(11) DEFAULT NULL,
194 `firstkill_t` int(11) DEFAULT NULL,
195 PRIMARY KEY (`id`),
196 KEY `map_id` (`map_id`),
197 KEY `match_id` (`match_id`),
198 KEY `team_id` (`team_id`),
199 CONSTRAINT `player_stats_ibfk_1` FOREIGN KEY (`map_id`) REFERENCES `map_stats` (`id`),
200 CONSTRAINT `player_stats_ibfk_2` FOREIGN KEY (`match_id`) REFERENCES `match` (`id`),
201 CONSTRAINT `player_stats_ibfk_3` FOREIGN KEY (`team_id`) REFERENCES `team` (`id`)
202) ENGINE=InnoDB DEFAULT CHARSET=latin1;
203/*!40101 SET character_set_client = @saved_cs_client */;
204
205--
206-- Dumping data for table `player_stats`
207--
208
209LOCK TABLES `player_stats` WRITE;
210/*!40000 ALTER TABLE `player_stats` DISABLE KEYS */;
211/*!40000 ALTER TABLE `player_stats` ENABLE KEYS */;
212UNLOCK TABLES;
213
214--
215-- Table structure for table `team`
216--
217
218DROP TABLE IF EXISTS `team`;
219/*!40101 SET @saved_cs_client = @@character_set_client */;
220/*!40101 SET character_set_client = utf8 */;
221CREATE TABLE `team` (
222 `id` int(11) NOT NULL AUTO_INCREMENT,
223 `user_id` int(11) DEFAULT NULL,
224 `name` varchar(40) DEFAULT NULL,
225 `flag` varchar(4) DEFAULT NULL,
226 `logo` varchar(10) DEFAULT NULL,
227 `auths` blob,
228 `tag` varchar(40) DEFAULT NULL,
229 `public_team` tinyint(1) DEFAULT NULL,
230 PRIMARY KEY (`id`),
231 KEY `user_id` (`user_id`),
232 KEY `ix_team_public_team` (`public_team`),
233 CONSTRAINT `team_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`)
234) ENGINE=InnoDB DEFAULT CHARSET=latin1;
235/*!40101 SET character_set_client = @saved_cs_client */;
236
237--
238-- Dumping data for table `team`
239--
240
241LOCK TABLES `team` WRITE;
242/*!40000 ALTER TABLE `team` DISABLE KEYS */;
243/*!40000 ALTER TABLE `team` ENABLE KEYS */;
244UNLOCK TABLES;
245
246--
247-- Table structure for table `user`
248--
249
250DROP TABLE IF EXISTS `user`;
251/*!40101 SET @saved_cs_client = @@character_set_client */;
252/*!40101 SET character_set_client = utf8 */;
253CREATE TABLE `user` (
254 `id` int(11) NOT NULL AUTO_INCREMENT,
255 `steam_id` varchar(40) DEFAULT NULL,
256 `name` varchar(40) DEFAULT NULL,
257 `admin` tinyint(1) DEFAULT NULL,
258 PRIMARY KEY (`id`),
259 UNIQUE KEY `steam_id` (`steam_id`)
260) ENGINE=InnoDB DEFAULT CHARSET=latin1;
261/*!40101 SET character_set_client = @saved_cs_client */;
262
263--
264-- Dumping data for table `user`
265--
266
267LOCK TABLES `user` WRITE;
268/*!40000 ALTER TABLE `user` DISABLE KEYS */;
269/*!40000 ALTER TABLE `user` ENABLE KEYS */;
270UNLOCK TABLES;
271/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
272
273/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
274/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
275/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
276/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
277/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
278/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
279/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
280
281-- Dump completed on 2018-02-27 21:28:50