· 6 years ago · Sep 18, 2019, 09:32 PM
1-- --------------------------------------------------------
2-- Host: 127.0.0.1
3-- Server version: 5.6.26-log - MySQL Community Server (GPL)
4-- Server OS: Win64
5-- HeidiSQL Version: 9.2.0.4970
6-- --------------------------------------------------------
7
8/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
9/*!40101 SET NAMES utf8mb4 */;
10/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
11/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
12
13-- Dumping database structure for exile
14CREATE DATABASE IF NOT EXISTS `exile` /*!40100 DEFAULT CHARACTER SET utf8 */;
15USE `exile`;
16
17
18-- Dumping structure for table exile.account
19CREATE TABLE IF NOT EXISTS `account` (
20 `uid` varchar(32) NOT NULL,
21 `clan_id` int(11) unsigned DEFAULT NULL,
22 `name` varchar(64) NOT NULL,
23 `score` int(11) NOT NULL DEFAULT '0',
24 `kills` int(11) unsigned NOT NULL DEFAULT '0',
25 `deaths` int(11) unsigned NOT NULL DEFAULT '0',
26 `locker` int(11) NOT NULL DEFAULT '0',
27 `first_connect_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
28 `last_connect_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
29 `last_disconnect_at` datetime DEFAULT NULL,
30 `total_connections` int(11) unsigned NOT NULL DEFAULT '1',
31 PRIMARY KEY (`uid`),
32 KEY `clan_id` (`clan_id`),
33 CONSTRAINT `account_ibfk_1` FOREIGN KEY (`clan_id`) REFERENCES `clan` (`id`) ON DELETE SET NULL
34) ENGINE=InnoDB DEFAULT CHARSET=utf8;
35
36-- Data exporting was unselected.
37
38
39-- Dumping structure for table exile.clan
40CREATE TABLE IF NOT EXISTS `clan` (
41 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
42 `name` varchar(64) NOT NULL,
43 `leader_uid` varchar(32) NOT NULL,
44 `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
45 PRIMARY KEY (`id`),
46 KEY `leader_uid` (`leader_uid`),
47 CONSTRAINT `clan_ibfk_1` FOREIGN KEY (`leader_uid`) REFERENCES `account` (`uid`) ON DELETE CASCADE
48) ENGINE=InnoDB DEFAULT CHARSET=utf8;
49
50-- Data exporting was unselected.
51
52
53-- Dumping structure for table exile.clan_map_marker
54CREATE TABLE IF NOT EXISTS `clan_map_marker` (
55 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
56 `clan_id` int(11) unsigned NOT NULL,
57 `markerType` tinyint(4) NOT NULL DEFAULT '-1',
58 `positionArr` text NOT NULL,
59 `color` varchar(255) NOT NULL,
60 `icon` varchar(255) NOT NULL,
61 `iconSize` float unsigned NOT NULL,
62 `label` varchar(255) NOT NULL,
63 `labelSize` float unsigned NOT NULL,
64 PRIMARY KEY (`id`),
65 KEY `clan_id` (`clan_id`),
66 CONSTRAINT `clan_map_marker_ibfk_1` FOREIGN KEY (`clan_id`) REFERENCES `clan` (`id`) ON DELETE CASCADE
67) ENGINE=InnoDB DEFAULT CHARSET=utf8;
68
69-- Data exporting was unselected.
70
71
72-- Dumping structure for table exile.construction
73CREATE TABLE IF NOT EXISTS `construction` (
74 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
75 `class` varchar(64) NOT NULL,
76 `account_uid` varchar(32) NOT NULL,
77 `spawned_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
78 `position_x` double NOT NULL DEFAULT '0',
79 `position_y` double NOT NULL DEFAULT '0',
80 `position_z` double NOT NULL DEFAULT '0',
81 `direction_x` double NOT NULL DEFAULT '0',
82 `direction_y` double NOT NULL DEFAULT '0',
83 `direction_z` double NOT NULL DEFAULT '0',
84 `up_x` double NOT NULL DEFAULT '0',
85 `up_y` double NOT NULL DEFAULT '0',
86 `up_z` double NOT NULL DEFAULT '0',
87 `is_locked` tinyint(1) NOT NULL DEFAULT '0',
88 `pin_code` varchar(6) NOT NULL DEFAULT '000000',
89 `damage` tinyint(1) unsigned NULL DEFAULT '0',
90 `territory_id` int(11) unsigned DEFAULT NULL,
91 `last_updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
92 `deleted_at` datetime DEFAULT NULL,
93 PRIMARY KEY (`id`),
94 KEY `account_uid` (`account_uid`),
95 KEY `territory_id` (`territory_id`),
96 CONSTRAINT `construction_ibfk_1` FOREIGN KEY (`account_uid`) REFERENCES `account` (`uid`) ON DELETE CASCADE,
97 CONSTRAINT `construction_ibfk_2` FOREIGN KEY (`territory_id`) REFERENCES `territory` (`id`) ON DELETE CASCADE
98) ENGINE=InnoDB DEFAULT CHARSET=utf8;
99
100-- Data exporting was unselected.
101
102
103-- Dumping structure for table exile.container
104CREATE TABLE IF NOT EXISTS `container` (
105 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
106 `class` varchar(64) NOT NULL,
107 `spawned_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
108 `account_uid` varchar(32) DEFAULT NULL,
109 `is_locked` tinyint(1) NOT NULL DEFAULT '0',
110 `position_x` double NOT NULL DEFAULT '0',
111 `position_y` double NOT NULL DEFAULT '0',
112 `position_z` double NOT NULL DEFAULT '0',
113 `direction_x` double NOT NULL DEFAULT '0',
114 `direction_y` double NOT NULL DEFAULT '0',
115 `direction_z` double NOT NULL DEFAULT '0',
116 `up_x` double NOT NULL DEFAULT '0',
117 `up_y` double NOT NULL DEFAULT '0',
118 `up_z` double NOT NULL DEFAULT '1',
119 `cargo_items` text NOT NULL,
120 `cargo_magazines` text NOT NULL,
121 `cargo_weapons` text NOT NULL,
122 `cargo_container` text NOT NULL,
123 `last_updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
124 `pin_code` varchar(6) NOT NULL DEFAULT '000000',
125 `territory_id` int(11) unsigned DEFAULT NULL,
126 `deleted_at` datetime DEFAULT NULL,
127 `money` int(11) unsigned NOT NULL DEFAULT '0',
128 `abandoned` datetime DEFAULT NULL,
129 PRIMARY KEY (`id`),
130 KEY `account_uid` (`account_uid`),
131 KEY `territory_id` (`territory_id`),
132 CONSTRAINT `container_ibfk_1` FOREIGN KEY (`account_uid`) REFERENCES `account` (`uid`) ON DELETE CASCADE,
133 CONSTRAINT `container_ibfk_2` FOREIGN KEY (`territory_id`) REFERENCES `territory` (`id`) ON DELETE CASCADE
134) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;
135
136-- Data exporting was unselected.
137
138
139-- Dumping structure for table exile.player
140CREATE TABLE IF NOT EXISTS `player` (
141 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
142 `name` varchar(64) NOT NULL,
143 `account_uid` varchar(32) NOT NULL,
144 `money` int(11) unsigned NOT NULL DEFAULT '0',
145 `damage` double unsigned NOT NULL DEFAULT '0',
146 `hunger` double unsigned NOT NULL DEFAULT '100',
147 `thirst` double unsigned NOT NULL DEFAULT '100',
148 `alcohol` double unsigned NOT NULL DEFAULT '0',
149 `temperature` double NOT NULL DEFAULT '37',
150 `wetness` double unsigned NOT NULL DEFAULT '0',
151 `oxygen_remaining` double unsigned NOT NULL DEFAULT '1',
152 `bleeding_remaining` double unsigned NOT NULL DEFAULT '0',
153 `hitpoints` varchar(1024) NOT NULL DEFAULT '[]',
154 `direction` double NOT NULL DEFAULT '0',
155 `position_x` double NOT NULL DEFAULT '0',
156 `position_y` double NOT NULL DEFAULT '0',
157 `position_z` double NOT NULL DEFAULT '0',
158 `spawned_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
159 `assigned_items` text NOT NULL,
160 `backpack` varchar(64) NOT NULL,
161 `backpack_items` text NOT NULL,
162 `backpack_magazines` text NOT NULL,
163 `backpack_weapons` text NOT NULL,
164 `current_weapon` varchar(64) NOT NULL,
165 `goggles` varchar(64) NOT NULL,
166 `handgun_items` text NOT NULL,
167 `handgun_weapon` varchar(64) NOT NULL,
168 `headgear` varchar(64) NOT NULL,
169 `binocular` varchar(64) NOT NULL,
170 `loaded_magazines` text NOT NULL,
171 `primary_weapon` varchar(64) NOT NULL,
172 `primary_weapon_items` text NOT NULL,
173 `secondary_weapon` varchar(64) NOT NULL,
174 `secondary_weapon_items` text NOT NULL,
175 `uniform` varchar(64) NOT NULL,
176 `uniform_items` text NOT NULL,
177 `uniform_magazines` text NOT NULL,
178 `uniform_weapons` text NOT NULL,
179 `vest` varchar(64) NOT NULL,
180 `vest_items` text NOT NULL,
181 `vest_magazines` text NOT NULL,
182 `vest_weapons` text NOT NULL,
183 `last_updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
184 PRIMARY KEY (`id`),
185 KEY `player_uid` (`account_uid`),
186 CONSTRAINT `player_ibfk_1` FOREIGN KEY (`account_uid`) REFERENCES `account` (`uid`) ON DELETE CASCADE
187) ENGINE=InnoDB DEFAULT CHARSET=utf8;
188
189-- Data exporting was unselected.
190
191
192-- Dumping structure for table exile.player_history
193CREATE TABLE IF NOT EXISTS `player_history` (
194 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
195 `account_uid` varchar(32) NOT NULL,
196 `name` varchar(64) NOT NULL,
197 `died_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
198 `position_x` double NOT NULL,
199 `position_y` double NOT NULL,
200 `position_z` double NOT NULL,
201 PRIMARY KEY (`id`)
202) ENGINE=InnoDB DEFAULT CHARSET=utf8;
203
204-- Data exporting was unselected.
205
206
207-- Dumping structure for table exile.territory
208CREATE TABLE IF NOT EXISTS `territory` (
209 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
210 `owner_uid` varchar(32) NOT NULL,
211 `name` varchar(64) NOT NULL,
212 `position_x` double NOT NULL,
213 `position_y` double NOT NULL,
214 `position_z` double NOT NULL,
215 `radius` double NOT NULL,
216 `level` int(11) NOT NULL,
217 `flag_texture` varchar(255) NOT NULL,
218 `flag_stolen` tinyint(1) NOT NULL DEFAULT '0',
219 `flag_stolen_by_uid` varchar(32) DEFAULT NULL,
220 `flag_stolen_at` datetime DEFAULT NULL,
221 `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
222 `last_paid_at` datetime DEFAULT CURRENT_TIMESTAMP,
223 `xm8_protectionmoney_notified` tinyint(1) NOT NULL DEFAULT '0',
224 `build_rights` varchar(640) NOT NULL DEFAULT '0',
225 `moderators` varchar(320) NOT NULL DEFAULT '0',
226 `deleted_at` datetime DEFAULT NULL,
227 PRIMARY KEY (`id`),
228 KEY `owner_uid` (`owner_uid`),
229 KEY `flag_stolen_by_uid` (`flag_stolen_by_uid`),
230 CONSTRAINT `territory_ibfk_1` FOREIGN KEY (`owner_uid`) REFERENCES `account` (`uid`) ON DELETE CASCADE,
231 CONSTRAINT `territory_ibfk_2` FOREIGN KEY (`flag_stolen_by_uid`) REFERENCES `account` (`uid`) ON DELETE SET NULL
232) ENGINE=InnoDB DEFAULT CHARSET=utf8;
233
234-- Data exporting was unselected.
235
236
237-- Dumping structure for table exile.vehicle
238CREATE TABLE IF NOT EXISTS `vehicle` (
239 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
240 `class` varchar(64) NOT NULL,
241 `spawned_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
242 `account_uid` varchar(32) DEFAULT NULL,
243 `is_locked` tinyint(1) NOT NULL DEFAULT '0',
244 `fuel` double unsigned NOT NULL DEFAULT '0',
245 `damage` double unsigned NOT NULL DEFAULT '0',
246 `hitpoints` text NOT NULL,
247 `position_x` double NOT NULL DEFAULT '0',
248 `position_y` double NOT NULL DEFAULT '0',
249 `position_z` double NOT NULL DEFAULT '0',
250 `direction_x` double NOT NULL DEFAULT '0',
251 `direction_y` double NOT NULL DEFAULT '0',
252 `direction_z` double NOT NULL DEFAULT '0',
253 `up_x` double NOT NULL DEFAULT '0',
254 `up_y` double NOT NULL DEFAULT '0',
255 `up_z` double NOT NULL DEFAULT '1',
256 `cargo_items` text NOT NULL,
257 `cargo_magazines` text NOT NULL,
258 `cargo_weapons` text NOT NULL,
259 `cargo_container` text NOT NULL,
260 `last_updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
261 `pin_code` varchar(6) NOT NULL DEFAULT '000000',
262 `deleted_at` datetime DEFAULT NULL,
263 `money` int(11) unsigned NOT NULL DEFAULT '0',
264 `vehicle_texture` text NOT NULL,
265 `territory_id` int(11) unsigned DEFAULT NULL,
266 `nickname` varchar(64) NOT NULL DEFAULT '',
267 PRIMARY KEY (`id`),
268 KEY `account_uid` (`account_uid`),
269 KEY `vehicle_ibfk_2_idx` (`territory_id`),
270 CONSTRAINT `vehicle_ibfk_1` FOREIGN KEY (`account_uid`) REFERENCES `account` (`uid`) ON DELETE CASCADE,
271 CONSTRAINT `vehicle_ibfk_2` FOREIGN KEY (`territory_id`) REFERENCES `territory` (`id`) ON DELETE CASCADE
272) ENGINE=InnoDB DEFAULT CHARSET=utf8;
273
274-- Data exporting was unselected.
275/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
276/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
277/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;