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