· 6 years ago · Dec 18, 2019, 04:00 PM
1-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
2--
3-- Host: localhost Database: tournament
4-- ------------------------------------------------------
5-- Server version 8.0.18
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 `game`
20--
21
22DROP TABLE IF EXISTS `game`;
23/*!40101 SET @saved_cs_client = @@character_set_client */;
24/*!40101 SET character_set_client = utf8 */;
25CREATE TABLE `game` (
26 `gameId` varchar(36) NOT NULL,
27 `code` varchar(45) NOT NULL,
28 `name` varchar(45) NOT NULL,
29 `fullName` varchar(80) NOT NULL,
30 `createdAt` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
31 `modifiedAt` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
32 PRIMARY KEY (`gameId`)
33) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
34/*!40101 SET character_set_client = @saved_cs_client */;
35
36--
37-- Dumping data for table `game`
38--
39
40LOCK TABLES `game` WRITE;
41/*!40000 ALTER TABLE `game` DISABLE KEYS */;
42INSERT INTO `game` VALUES ('1ffb6c19-3689-4a70-b005-c6273115ecd6','test','TEST GAME','TEST GAME 2','2019-12-18 15:52:55.992454','2019-12-18 15:52:55.992454');
43/*!40000 ALTER TABLE `game` ENABLE KEYS */;
44UNLOCK TABLES;
45
46--
47-- Table structure for table `platform`
48--
49
50DROP TABLE IF EXISTS `platform`;
51/*!40101 SET @saved_cs_client = @@character_set_client */;
52/*!40101 SET character_set_client = utf8 */;
53CREATE TABLE `platform` (
54 `platformId` varchar(36) NOT NULL,
55 `name` varchar(45) NOT NULL,
56 `fullName` varchar(80) NOT NULL,
57 `createdAt` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
58 `modifiedAt` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
59 PRIMARY KEY (`platformId`)
60) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
61/*!40101 SET character_set_client = @saved_cs_client */;
62
63--
64-- Dumping data for table `platform`
65--
66
67LOCK TABLES `platform` WRITE;
68/*!40000 ALTER TABLE `platform` DISABLE KEYS */;
69INSERT INTO `platform` VALUES ('b32147fb-a6f2-42b7-a8e8-6953cb071b4a','TEST','TESTER','2019-12-18 15:51:42.385336','2019-12-18 15:51:42.385336');
70/*!40000 ALTER TABLE `platform` ENABLE KEYS */;
71UNLOCK TABLES;
72
73--
74-- Table structure for table `round`
75--
76
77DROP TABLE IF EXISTS `round`;
78/*!40101 SET @saved_cs_client = @@character_set_client */;
79/*!40101 SET character_set_client = utf8 */;
80CREATE TABLE `round` (
81 `roundId` varchar(36) NOT NULL,
82 `number` int(11) NOT NULL,
83 `name` varchar(255) DEFAULT NULL,
84 `isClose` tinyint(4) NOT NULL DEFAULT '0',
85 `deletedAt` datetime(6) DEFAULT NULL,
86 `createdAt` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
87 `modifiedAt` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
88 `stageStageId` varchar(36) DEFAULT NULL,
89 PRIMARY KEY (`roundId`),
90 KEY `FK_32d992e4509b6bd0f359d91a56f` (`stageStageId`),
91 CONSTRAINT `FK_32d992e4509b6bd0f359d91a56f` FOREIGN KEY (`stageStageId`) REFERENCES `stage` (`stageId`)
92) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
93/*!40101 SET character_set_client = @saved_cs_client */;
94
95--
96-- Dumping data for table `round`
97--
98
99LOCK TABLES `round` WRITE;
100/*!40000 ALTER TABLE `round` DISABLE KEYS */;
101/*!40000 ALTER TABLE `round` ENABLE KEYS */;
102UNLOCK TABLES;
103
104--
105-- Table structure for table `stage`
106--
107
108DROP TABLE IF EXISTS `stage`;
109/*!40101 SET @saved_cs_client = @@character_set_client */;
110/*!40101 SET character_set_client = utf8 */;
111CREATE TABLE `stage` (
112 `stageId` varchar(36) NOT NULL,
113 `name` varchar(45) NOT NULL,
114 `type` enum('windowed','swiss','single_elim') NOT NULL,
115 `maxRounds` int(11) DEFAULT NULL,
116 `deletedAt` datetime(6) DEFAULT NULL,
117 `createdAt` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
118 `modifiedAt` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
119 `tournamentId` varchar(255) DEFAULT NULL,
120 PRIMARY KEY (`stageId`),
121 KEY `FK_fbdb4376e3f5356708ef21e3b5d` (`tournamentId`),
122 CONSTRAINT `FK_fbdb4376e3f5356708ef21e3b5d` FOREIGN KEY (`tournamentId`) REFERENCES `tournament` (`tournamentId`)
123) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
124/*!40101 SET character_set_client = @saved_cs_client */;
125
126--
127-- Dumping data for table `stage`
128--
129
130LOCK TABLES `stage` WRITE;
131/*!40000 ALTER TABLE `stage` DISABLE KEYS */;
132/*!40000 ALTER TABLE `stage` ENABLE KEYS */;
133UNLOCK TABLES;
134
135--
136-- Table structure for table `tournament`
137--
138
139DROP TABLE IF EXISTS `tournament`;
140/*!40101 SET @saved_cs_client = @@character_set_client */;
141/*!40101 SET character_set_client = utf8 */;
142CREATE TABLE `tournament` (
143 `tournamentId` varchar(36) NOT NULL,
144 `name` varchar(40) NOT NULL,
145 `fullName` varchar(80) NOT NULL,
146 `status` enum('started','running','completed') NOT NULL DEFAULT 'started',
147 `isPublic` tinyint(4) NOT NULL DEFAULT '0',
148 `isArchived` tinyint(4) NOT NULL DEFAULT '0',
149 `startsAt` datetime NOT NULL,
150 `endsAt` datetime NOT NULL,
151 `registartionStartsAt` datetime NOT NULL,
152 `registartionEndsAt` datetime NOT NULL,
153 `description` tinytext NOT NULL,
154 `rules` mediumtext NOT NULL,
155 `createdAt` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
156 `modifiedAt` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
157 `gameGameId` varchar(36) DEFAULT NULL,
158 PRIMARY KEY (`tournamentId`),
159 KEY `FK_13336c3e42ce182228da8f70ee8` (`gameGameId`),
160 CONSTRAINT `FK_13336c3e42ce182228da8f70ee8` FOREIGN KEY (`gameGameId`) REFERENCES `game` (`gameId`)
161) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
162/*!40101 SET character_set_client = @saved_cs_client */;
163
164--
165-- Dumping data for table `tournament`
166--
167
168LOCK TABLES `tournament` WRITE;
169/*!40000 ALTER TABLE `tournament` DISABLE KEYS */;
170INSERT INTO `tournament` VALUES ('b1e8bc17-ae13-4fae-b241-0955d1dc3a54','TEst','Test tournametn','running',0,0,'2019-12-09 00:00:00','2019-12-09 00:00:00','2019-12-09 00:00:00','2019-12-09 00:00:00','TEST','TESTER RULES','2019-12-18 15:53:28.107220','2019-12-18 15:53:28.107220','1ffb6c19-3689-4a70-b005-c6273115ecd6');
171/*!40000 ALTER TABLE `tournament` ENABLE KEYS */;
172UNLOCK TABLES;
173
174--
175-- Table structure for table `tournamentPlatforms`
176--
177
178DROP TABLE IF EXISTS `tournamentPlatforms`;
179/*!40101 SET @saved_cs_client = @@character_set_client */;
180/*!40101 SET character_set_client = utf8 */;
181CREATE TABLE `tournamentPlatforms` (
182 `tournamentId` varchar(36) NOT NULL,
183 `platformId` varchar(36) NOT NULL,
184 PRIMARY KEY (`tournamentId`,`platformId`),
185 KEY `IDX_a7e983a22a6be970b4f577aa3f` (`tournamentId`),
186 KEY `IDX_2d39aab9b8a7c742bb242887b1` (`platformId`),
187 CONSTRAINT `FK_2d39aab9b8a7c742bb242887b18` FOREIGN KEY (`platformId`) REFERENCES `platform` (`platformId`) ON DELETE CASCADE,
188 CONSTRAINT `FK_a7e983a22a6be970b4f577aa3fd` FOREIGN KEY (`tournamentId`) REFERENCES `tournament` (`tournamentId`) ON DELETE CASCADE
189) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
190/*!40101 SET character_set_client = @saved_cs_client */;
191
192--
193-- Dumping data for table `tournamentPlatforms`
194--
195
196LOCK TABLES `tournamentPlatforms` WRITE;
197/*!40000 ALTER TABLE `tournamentPlatforms` DISABLE KEYS */;
198INSERT INTO `tournamentPlatforms` VALUES ('b1e8bc17-ae13-4fae-b241-0955d1dc3a54','b32147fb-a6f2-42b7-a8e8-6953cb071b4a');
199/*!40000 ALTER TABLE `tournamentPlatforms` ENABLE KEYS */;
200UNLOCK TABLES;
201
202--
203-- Table structure for table `window`
204--
205
206DROP TABLE IF EXISTS `window`;
207/*!40101 SET @saved_cs_client = @@character_set_client */;
208/*!40101 SET character_set_client = utf8 */;
209CREATE TABLE `window` (
210 `windowId` varchar(36) NOT NULL,
211 `open` datetime NOT NULL,
212 `close` datetime NOT NULL,
213 `deletedAt` datetime(6) DEFAULT NULL,
214 `createdAt` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
215 `modifiedAt` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
216 `roundRoundId` varchar(36) DEFAULT NULL,
217 PRIMARY KEY (`windowId`),
218 KEY `FK_afc1468c49bd1484ed84bff5408` (`roundRoundId`),
219 CONSTRAINT `FK_afc1468c49bd1484ed84bff5408` FOREIGN KEY (`roundRoundId`) REFERENCES `round` (`roundId`)
220) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
221/*!40101 SET character_set_client = @saved_cs_client */;
222
223--
224-- Dumping data for table `window`
225--
226
227LOCK TABLES `window` WRITE;
228/*!40000 ALTER TABLE `window` DISABLE KEYS */;
229/*!40000 ALTER TABLE `window` ENABLE KEYS */;
230UNLOCK TABLES;
231/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
232
233/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
234/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
235/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
236/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
237/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
238/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
239/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
240
241-- Dump completed on 2019-12-18 9:56:06