· 5 years ago · May 04, 2020, 01:46 PM
1SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
2SET time_zone = "+00:00";
3
4-- --------------------------------------------------------
5
6--
7-- Base de données : `eresia`
8--
9
10CREATE DATABASE IF NOT EXISTS `eresia` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
11USE `eresia`;
12
13-- --------------------------------------------------------
14
15--
16-- Structure de la table `configuration`
17--
18
19DROP TABLE IF EXISTS `configuration`;
20CREATE TABLE `configuration` (
21 `slots` int(11) NOT NULL,
22 `motd` varchar(255) COLLATE utf8_roman_ci NOT NULL,
23 `close_type` varchar(255) COLLATE utf8_roman_ci NOT NULL,
24 `server_line` varchar(255) COLLATE utf8_roman_ci NOT NULL,
25 `max_players` int(11) NOT NULL
26) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_roman_ci;
27
28--
29-- Contenu de la table `configuration`
30--
31
32INSERT INTO `configuration` (`slots`, `motd`, `close_type`, `server_line`, `max_players`) VALUES
33(250, '§c§lServeur en phase de développement...', 'staff', '§6? §e§lEresia - Pre Alpha 1 §6?', 250);
34
35-- --------------------------------------------------------
36
37--
38-- Structure de la table `denunciations`
39--
40
41DROP TABLE IF EXISTS `denunciations`;
42CREATE TABLE `denunciations` (
43 `denouncement_id` int(11) NOT NULL,
44 `denouncer` binary(16) NOT NULL,
45 `date` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
46 `reason` varchar(255) NOT NULL,
47 `suspect_name` varchar(255) NOT NULL
48) ENGINE=InnoDB DEFAULT CHARSET=utf8;
49
50-- --------------------------------------------------------
51
52--
53-- Structure de la table `friendship`
54--
55
56DROP TABLE IF EXISTS `friendship`;
57CREATE TABLE `friendship` (
58 `friendship_id` bigint(20) NOT NULL,
59 `requester_uuid` binary(16) NOT NULL,
60 `recipient_uuid` binary(16) NOT NULL,
61 `demand_date` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
62 `acceptation_date` timestamp NULL DEFAULT NULL,
63 `active_status` bit(1) NOT NULL
64) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_roman_ci;
65
66-- --------------------------------------------------------
67
68--
69-- Structure de la table `game_category`
70--
71
72DROP TABLE IF EXISTS `game_category`;
73CREATE TABLE `game_category` (
74 `category_id` tinyint(4) NOT NULL,
75 `name` tinytext
76) ENGINE=InnoDB DEFAULT CHARSET=utf8;
77
78--
79-- Contenu de la table `game_category`
80--
81
82INSERT INTO `game_category` (`category_id`, `name`) VALUES
83 (1, 'koth');
84
85-- --------------------------------------------------------
86
87--
88-- Structure de la table `groups`
89--
90
91DROP TABLE IF EXISTS `groups`;
92CREATE TABLE `groups` (
93 `group_id` tinyint(4) NOT NULL,
94 `group_name` varchar(255) COLLATE utf8_roman_ci NOT NULL,
95 `rank` int(11) NOT NULL,
96 `tag` varchar(255) COLLATE utf8_roman_ci NOT NULL,
97 `prefix` varchar(255) COLLATE utf8_roman_ci NOT NULL,
98 `suffix` varchar(255) COLLATE utf8_roman_ci NOT NULL
99) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8 COLLATE=utf8_roman_ci;
100
101--
102-- Contenu de la table `groups`
103--
104
105INSERT INTO `groups` (`group_id`, `group_name`, `rank`, `tag`, `prefix`, `suffix`) VALUES
106 (1, 'Joueur', 90, '', '&7', '&r'),
107 (2, 'Héros', 85, '&f[Héros]&s', '&f', '&r'),
108 (3, 'Elite', 80, '&e[Elite]&s', '&e', '&r'),
109 (4, 'Légende', 75, '&6[Légende]&s', '&6', '&r'),
110 (5, 'Idole', 60, '&d[Idole]&s', '&d', '&r'),
111 (6, 'Guide', 55, '&3[Guide]&s', '&3', '&r'),
112 (7, 'Staff', 50, '&2[Staff]&s', '&2', '&r'),
113 (8, 'Builder', 50, '&2[Builder]&s', '&2', '&r'),
114 (9, 'Développeur', 45, '&c[Développeur]&s', '&c', '&r'),
115 (10, 'Modérateur', 40, '&9[Modérateur]&s', '&9', '&r'),
116 (11, 'RespMod', 35, '&9[Resp.&sModo]&s', '&9', '&r'),
117 (12, 'RespBuild', 35, '&2[Resp.&sBuild]&s', '&2', '&r'),
118 (13, 'Admin', 1, '&4[Admin]&s', '&4', '&r');
119
120-- --------------------------------------------------------
121
122--
123-- Structure de la table `bukkit_permissions`
124--
125
126DROP TABLE IF EXISTS `bukkit_permissions`;
127CREATE TABLE `bukkit_permissions` (
128 `groups_id` tinyint(4) NOT NULL,
129 `minecraft_command_op` bit(1) NOT NULL,
130 `bukkit_command_op_give` bit(1) NOT NULL,
131 `bukkit_command_plugins` bit(1) NOT NULL,
132 `bukkit_command_effect` bit(1) NOT NULL,
133 `bukkit_command_gamemode` bit(1) NOT NULL,
134 `bukkit_command_teleport` bit(1) NOT NULL
135) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8 COLLATE=utf8_roman_ci;
136
137--
138-- Contenu de la table `bukkit_permissions`
139--
140
141INSERT INTO `bukkit_permissions` (`groups_id`, `minecraft_command_op`, `bukkit_command_op_give`, `bukkit_command_plugins`, `bukkit_command_effect`, `bukkit_command_gamemode`, `bukkit_command_teleport`) VALUES
142 (1, b'0', b'0', b'0', b'0', b'0', b'0'),
143 (2, b'0', b'0', b'0', b'0', b'0', b'0'),
144 (3, b'0', b'0', b'0', b'0', b'0', b'0'),
145 (4, b'0', b'0', b'0', b'0', b'0', b'0'),
146 (5, b'0', b'0', b'0', b'0', b'0', b'0'),
147 (6, b'0', b'0', b'0', b'0', b'0', b'0'),
148 (7, b'0', b'0', b'0', b'0', b'0', b'0'),
149 (8, b'0', b'0', b'0', b'0', b'0', b'0'),
150 (9, b'0', b'0', b'0', b'0', b'0', b'0'),
151 (10, b'0', b'0', b'0', b'1', b'1', b'1'),
152 (11, b'1', b'1', b'1', b'1', b'1', b'1'),
153 (12, b'1', b'1', b'1', b'1', b'1', b'1'),
154 (13, b'1', b'1', b'1', b'1', b'1', b'1');
155
156-- --------------------------------------------------------
157
158--
159-- Structure de la table `hub_permissions`
160--
161
162DROP TABLE IF EXISTS `hub_permissions`;
163CREATE TABLE `hub_permissions` (
164 `groups_id` tinyint(4) NOT NULL,
165 `hub_mod_slow` bit(1) NOT NULL,
166 `hub_mod_shutup` bit(1) NOT NULL,
167 `hub_announce` bit(1) NOT NULL,
168 `hub_bypassmute` bit(1) NOT NULL,
169 `hub_fly` bit(1) NOT NULL
170) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8 COLLATE=utf8_roman_ci;
171
172--
173-- Contenu de la table `hub_permissions`
174--
175
176INSERT INTO `hub_permissions` (`groups_id`, `hub_mod_slow`, `hub_mod_shutup`, `hub_announce`, `hub_bypassmute`, `hub_fly`) VALUES
177 (1, b'0', b'0', b'0', b'0', b'0'),
178 (2, b'0', b'0', b'0', b'0', b'0'),
179 (3, b'0', b'0', b'0', b'0', b'0'),
180 (4, b'0', b'0', b'0', b'0', b'0'),
181 (5, b'0', b'0', b'0', b'0', b'1'),
182 (6, b'0', b'0', b'0', b'1', b'1'),
183 (7, b'0', b'0', b'0', b'1', b'1'),
184 (8, b'0', b'0', b'0', b'1', b'1'),
185 (9, b'0', b'0', b'0', b'1', b'1'),
186 (10, b'1', b'1', b'0', b'1', b'1'),
187 (11, b'1', b'1', b'0', b'1', b'1'),
188 (12, b'0', b'0', b'0', b'1', b'1'),
189 (13, b'1', b'1', b'1', b'1', b'1');
190
191-- --------------------------------------------------------
192
193--
194-- Structure de la table `moderation_permissions`
195--
196
197DROP TABLE IF EXISTS `moderation_permissions`;
198CREATE TABLE `moderation_permissions` (
199 `groups_id` tinyint(4) NOT NULL,
200 `mod_ban` bit(1) NOT NULL,
201 `mod_tp` bit(1) NOT NULL,
202 `mod_kick` bit(1) NOT NULL,
203 `mod_pardon` bit(1) NOT NULL,
204 `mod_mute_longtime` bit(1) NOT NULL,
205 `mod_mute` bit(1) NOT NULL,
206 `mod_channel` bit(1) NOT NULL,
207 `mod_channel_report` bit(1) NOT NULL
208) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8 COLLATE=utf8_roman_ci;
209
210--
211-- Contenu de la table `moderation_permissions`
212--
213
214INSERT INTO `moderation_permissions` (`groups_id`, `mod_ban`, `mod_tp`, `mod_kick`, `mod_pardon`, `mod_mute_longtime`, `mod_mute`, `mod_channel`, `mod_channel_report`) VALUES
215(1, b'0', b'0', b'0', b'0', b'0', b'0', b'0', b'0'),
216(2, b'0', b'0', b'0', b'0', b'0', b'0', b'0', b'0'),
217(3, b'0', b'0', b'0', b'0', b'0', b'0', b'0', b'0'),
218(4, b'0', b'0', b'0', b'0', b'0', b'0', b'0', b'0'),
219(5, b'0', b'0', b'0', b'0', b'0', b'0', b'0', b'0'),
220(6, b'0', b'0', b'0', b'0', b'0', b'1', b'1', b'1'),
221(7, b'0', b'0', b'0', b'0', b'0', b'1', b'1', b'1'),
222(8, b'0', b'0', b'0', b'0', b'0', b'1', b'1', b'1'),
223(9, b'0', b'0', b'0', b'0', b'0', b'1', b'1', b'1'),
224(10, b'1', b'1', b'1', b'1', b'1', b'1', b'1', b'1'),
225(11, b'1', b'1', b'1', b'1', b'1', b'1', b'1', b'1'),
226(12, b'1', b'1', b'1', b'1', b'1', b'1', b'1', b'1'),
227(13, b'1', b'1', b'1', b'1', b'1', b'1', b'1', b'1');
228
229-- --------------------------------------------------------
230
231--
232-- Structure de la table `network_stats`
233--
234
235DROP TABLE IF EXISTS `network_stats`;
236CREATE TABLE `network_stats` (
237 `uuid` binary(16) NOT NULL,
238 `creation_date` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
239 `update_date` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
240 `played_time` bigint(20) NOT NULL
241) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_roman_ci;
242
243-- --------------------------------------------------------
244
245--
246-- Structure de la table `players`
247--
248
249DROP TABLE IF EXISTS `players`;
250CREATE TABLE `players` (
251 `uuid` binary(16) NOT NULL,
252 `name` varchar(255) COLLATE utf8_roman_ci NOT NULL,
253 `coins` int(11) NOT NULL DEFAULT '0',
254 `stars` int(11) NOT NULL DEFAULT '0',
255 `last_login` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
256 `first_login` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
257 `last_ip` varchar(15) COLLATE utf8_roman_ci DEFAULT NULL,
258 `group_id` bigint(20) NOT NULL
259) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_roman_ci;
260
261-- --------------------------------------------------------
262
263--
264-- Structure de la table `player_settings`
265--
266
267DROP TABLE IF EXISTS `player_settings`;
268CREATE TABLE `player_settings` (
269 `uuid` binary(16) NOT NULL,
270 `friendship_demand_receive` bit(1) NOT NULL,
271 `private_message_receive` bit(1) NOT NULL
272) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_roman_ci;
273
274-- --------------------------------------------------------
275
276--
277-- Structure de la table `sanctions`
278--
279
280DROP TABLE IF EXISTS `sanctions`;
281CREATE TABLE `sanctions` (
282 `sanction_id` bigint(20) NOT NULL,
283 `player_uuid` binary(16) NOT NULL,
284 `type_id` tinyint(4) NOT NULL,
285 `reason` varchar(255) COLLATE utf8_roman_ci NOT NULL,
286 `punisher_uuid` binary(16) NOT NULL,
287 `expiration_date` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
288 `is_deleted` bit(1) NOT NULL,
289 `creation_date` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
290 `update_date` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
291) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_roman_ci;
292
293-- --------------------------------------------------------
294
295--
296-- Structure de la table `sanctions_ref`
297--
298
299DROP TABLE IF EXISTS `sanctions_ref`;
300CREATE TABLE `sanctions_ref` (
301 `type_id` tinyint(4) NOT NULL,
302 `text` varchar(255) COLLATE utf8_roman_ci NOT NULL
303) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_roman_ci;
304
305--
306-- Contenu de la table `sanctions_ref`
307--
308
309INSERT INTO `sanctions_ref` (`type_id`, `text`) VALUES
310 (1, 'Avertissement'),
311 (2, 'Ban'),
312 (3, 'Kick'),
313 (4, 'Mute'),
314 (5, 'Text');
315
316-- --------------------------------------------------------
317
318--
319-- Structure de la table `staff_permissions`
320--
321
322DROP TABLE IF EXISTS `staff_permissions`;
323CREATE TABLE `staff_permissions` (
324 `groups_id` tinyint(4) NOT NULL,
325 `netjoin_closed` bit(1) NOT NULL,
326 `netjoin_vip` bit(1) NOT NULL,
327 `netjoin_full` bit(1) NOT NULL
328) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8 COLLATE=utf8_roman_ci;
329
330--
331-- Contenu de la table `staff_permissions`
332--
333
334INSERT INTO `staff_permissions` (`groups_id`, `netjoin_closed`, `netjoin_vip`, `netjoin_full`) VALUES
335 (1, b'0', b'0', b'0'),
336 (2, b'0', b'0', b'0'),
337 (3, b'0', b'0', b'0'),
338 (4, b'0', b'1', b'0'),
339 (5, b'0', b'1', b'1'),
340 (6, b'1', b'1', b'1'),
341 (7, b'1', b'1', b'1'),
342 (8, b'1', b'1', b'1'),
343 (9, b'1', b'1', b'1'),
344 (10, b'1', b'1', b'1'),
345 (11, b'1', b'1', b'1'),
346 (12, b'1', b'1', b'1'),
347 (13, b'1', b'1', b'1');
348
349-- --------------------------------------------------------
350
351--
352-- Structure de la table `transaction_shop`
353--
354
355DROP TABLE IF EXISTS `transaction_shop`;
356CREATE TABLE `transaction_shop` (
357 `transaction_id` bigint(20) NOT NULL,
358 `item_name` int(11) DEFAULT NULL,
359 `price_coins` int(11) DEFAULT NULL,
360 `price_stars` int(11) DEFAULT NULL,
361 `transaction_date` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
362 `uuid_buyer` binary(16) NOT NULL
363) ENGINE=InnoDB DEFAULT CHARSET=utf8;
364
365--
366-- Index pour les tables exportées
367--
368
369--
370-- Index pour la table `bukkit_permissions`
371--
372ALTER TABLE `bukkit_permissions`
373ADD PRIMARY KEY (`groups_id`);
374
375--
376-- Index pour la table `denunciations`
377--
378ALTER TABLE `denunciations`
379ADD PRIMARY KEY (`denouncement_id`);
380
381--
382-- Index pour la table `friendship`
383--
384ALTER TABLE `friendship`
385ADD PRIMARY KEY (`friendship_id`),
386ADD KEY `Requester_uuid` (`requester_uuid`),
387ADD KEY `recepient_uuid` (`recipient_uuid`),
388ADD KEY `active_status` (`active_status`);
389
390--
391-- Index pour la table `game_category`
392--
393ALTER TABLE `game_category`
394ADD PRIMARY KEY (`category_id`);
395
396--
397-- Index pour la table `groups`
398--
399ALTER TABLE `groups`
400ADD PRIMARY KEY (`group_id`);
401
402--
403-- Index pour la table `hub_permissions`
404--
405ALTER TABLE `hub_permissions`
406ADD PRIMARY KEY (`groups_id`),
407ADD KEY `groups_id` (`groups_id`);
408
409--
410-- Index pour la table `moderation_permissions`
411--
412ALTER TABLE `moderation_permissions`
413ADD PRIMARY KEY (`groups_id`);
414
415--
416-- Index pour la table `players`
417--
418ALTER TABLE `players`
419ADD PRIMARY KEY (`uuid`);
420
421--
422-- Index pour la table `player_settings`
423--
424ALTER TABLE `player_settings`
425ADD PRIMARY KEY (`uuid`);
426
427--
428-- Index pour la table `sanctions`
429--
430ALTER TABLE `sanctions`
431ADD PRIMARY KEY (`sanction_id`);
432
433--
434-- Index pour la table `sanctions_ref`
435--
436ALTER TABLE `sanctions_ref`
437ADD PRIMARY KEY (`type_id`);
438
439--
440-- Index pour la table `staff_permissions`
441--
442ALTER TABLE `staff_permissions`
443ADD PRIMARY KEY (`groups_id`);
444
445--
446-- Index pour la table `transaction_shop`
447--
448ALTER TABLE `transaction_shop`
449ADD PRIMARY KEY (`transaction_id`);
450
451--
452-- AUTO_INCREMENT pour les tables exportées
453--
454
455--
456-- AUTO_INCREMENT pour la table `bukkit_permissions`
457--
458ALTER TABLE `bukkit_permissions`
459MODIFY `groups_id` tinyint(4) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=20;
460
461--
462-- AUTO_INCREMENT pour la table `denunciations`
463--
464ALTER TABLE `denunciations`
465MODIFY `denouncement_id` int(11) NOT NULL AUTO_INCREMENT;
466
467--
468-- AUTO_INCREMENT pour la table `friendship`
469--
470ALTER TABLE `friendship`
471MODIFY `friendship_id` bigint(20) NOT NULL AUTO_INCREMENT;
472
473--
474-- AUTO_INCREMENT pour la table `groups`
475--
476ALTER TABLE `groups`
477MODIFY `group_id` tinyint(4) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=20;
478
479--
480-- AUTO_INCREMENT pour la table `hub_permissions`
481--
482ALTER TABLE `hub_permissions`
483MODIFY `groups_id` tinyint(4) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=20;
484
485--
486-- AUTO_INCREMENT pour la table `moderation_permissions`
487--
488ALTER TABLE `moderation_permissions`
489MODIFY `groups_id` tinyint(4) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=20;
490
491--
492-- AUTO_INCREMENT pour la table `sanctions`
493--
494ALTER TABLE `sanctions`
495MODIFY `sanction_id` bigint(20) NOT NULL AUTO_INCREMENT;
496
497--
498-- AUTO_INCREMENT pour la table `staff_permissions`
499--
500ALTER TABLE `staff_permissions`
501MODIFY `groups_id` tinyint(4) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=20;
502
503--
504-- AUTO_INCREMENT pour la table `transaction_shop`
505--
506ALTER TABLE `transaction_shop`
507MODIFY `transaction_id` bigint(20) NOT NULL AUTO_INCREMENT;