-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathinstall.js
1818 lines (1726 loc) · 86.2 KB
/
install.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
const Message = require('./api/message');
const fs = require('fs');
const Functions = require('./api/functions');
const config = require('./config.json');
const mysqlObject = require('mysql');
let mysql = mysqlObject.createPool({
"host": config.mysql.host,
"user": config.mysql.user,
"password": config.mysql.password
});
const queries = [
`CREATE DATABASE IF NOT EXISTS ${config.mysql.database} CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_assault_match_objectives (
id int(11) NOT NULL AUTO_INCREMENT,
match_id int(11) NOT NULL,
map int(11) NOT NULL,
timestamp float NOT NULL,
obj_id int(11) NOT NULL,
player int(11) NOT NULL,
bfinal int(11) NOT NULL,
PRIMARY KEY (id))
ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_assault_objects (
id int(11) NOT NULL AUTO_INCREMENT,
map int(11) NOT NULL,
obj_order int(11) NOT NULL,
name varchar(100) NOT NULL,
obj_id int(11) NOT NULL,
matches int(11) NOT NULL,
taken int(11) NOT NULL
,PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_countries (
id int(11) NOT NULL AUTO_INCREMENT,
code varchar(2) NOT NULL,
first int(11) NOT NULL,
last int(11) NOT NULL,
total int(11) NOT NULL
,PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_ctf_caps (
id int NOT NULL AUTO_INCREMENT,
match_id int NOT NULL,
gametype_id int NOT NULL,
match_date int NOT NULL,
map_id int NOT NULL,
cap_team int NOT NULL,
flag_team int NOT NULL,
grab_time float NOT NULL,
grab_player int NOT NULL,
cap_time float NOT NULL,
cap_player int NOT NULL,
travel_time float NOT NULL,
carry_time float NOT NULL,
carry_time_percent float NOT NULL,
drop_time float NOT NULL,
drop_time_percent float NOT NULL,
total_drops int NOT NULL,
total_pickups int NOT NULL,
total_covers int NOT NULL,
total_seals int NOT NULL,
total_assists int NOT NULL,
total_self_covers int NOT NULL,
total_deaths int NOT NULL,
total_suicides int NOT NULL,
team_0_kills int NOT NULL,
team_1_kills int NOT NULL,
team_2_kills int NOT NULL,
team_3_kills int NOT NULL,
team_0_suicides int NOT NULL,
team_1_suicides int NOT NULL,
team_2_suicides int NOT NULL,
team_3_suicides int NOT NULL,
PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_ctf_assists (
id int NOT NULL AUTO_INCREMENT,
match_id int NOT NULL,
match_date int NOT NULL,
map_id int NOT NULL,
cap_id int NOT NULL,
player_id int NOT NULL,
pickup_time float NOT NULL,
dropped_time float NOT NULL,
carry_time float NOT NULL,
PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_ctf_covers (
id int NOT NULL AUTO_INCREMENT,
match_id int NOT NULL,
match_date int NOT NULL,
map_id int NOT NULL,
cap_id int NOT NULL,
timestamp float NOT NULL,
killer_id int NOT NULL,
killer_team int NOT NULL,
victim_id int NOT NULL,
PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_ctf_self_covers (
id int NOT NULL AUTO_INCREMENT,
match_id int NOT NULL,
match_date int NOT NULL,
map_id int NOT NULL,
cap_id int NOT NULL,
timestamp float NOT NULL,
killer_id int NOT NULL,
killer_team int NOT NULL,
victim_id int NOT NULL,
PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_ctf_seals (
id int NOT NULL AUTO_INCREMENT,
match_id int NOT NULL,
match_date int NOT NULL,
map_id int NOT NULL,
cap_id int NOT NULL,
timestamp float NOT NULL,
killer_id int NOT NULL,
victim_id int NOT NULL,
PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_ctf_carry_times (
id int NOT NULL AUTO_INCREMENT,
match_id int NOT NULL,
match_date int NOT NULL,
map_id int NOT NULL,
cap_id int NOT NULL,
flag_team int NOT NULL,
player_id int NOT NULL,
player_team int NOT NULL,
start_time float NOT NULL,
end_time float NOT NULL,
carry_time float NOT NULL,
carry_percent float NOT NULL,
PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_ctf_returns (
id int NOT NULL AUTO_INCREMENT,
match_id int NOT NULL,
match_date int NOT NULL,
map_id int NOT NULL,
flag_team int NOT NULL,
grab_time float NOT NULL,
grab_player int NOT NULL,
return_time float NOT NULL,
return_player int NOT NULL,
return_string VARCHAR(60) NOT NULL,
distance_to_cap float NOT NULL,
pos_x float NOT NULL,
pos_y float NOT NULL,
pos_z float NOT NULL,
travel_time float NOT NULL,
carry_time float NOT NULL,
carry_time_percent float NOT NULL,
drop_time float NOT NULL,
drop_time_percent float NOT NULL,
total_drops int NOT NULL,
total_pickups int NOT NULL,
total_covers int NOT NULL,
total_seals int NOT NULL,
total_self_covers int NOT NULL,
total_deaths int NOT NULL,
total_suicides int NOT NULL,
team_0_kills int NOT NULL,
team_1_kills int NOT NULL,
team_2_kills int NOT NULL,
team_3_kills int NOT NULL,
team_0_suicides int NOT NULL,
team_1_suicides int NOT NULL,
team_2_suicides int NOT NULL,
team_3_suicides int NOT NULL,
PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_ctf_flag_deaths (
id int NOT NULL AUTO_INCREMENT,
match_id int NOT NULL,
match_date int NOT NULL,
map_id int NOT NULL,
timestamp float NOT NULL,
cap_id int NOT NULL,
killer_id int NOT NULL,
killer_team int NOT NULL,
victim_id int NOT NULL,
victim_team int NOT NULL,
kill_distance float NOT NULL,
distance_to_cap float NOT NULL,
distance_to_enemy_base float NOT NULL,
PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE nstats_ctf_flag_drops (
id int NOT NULL AUTO_INCREMENT,
match_id int NOT NULL,
match_date int NOT NULL,
map_id int NOT NULL,
timestamp float NOT NULL,
cap_id int NOT NULL,
flag_team int NOT NULL,
player_id int NOT NULL,
player_team int NOT NULL,
distance_to_cap float NOT NULL,
position_x float NOT NULL,
position_y float NOT NULL,
position_z float NOT NULL,
time_dropped float NOT NULL,
PRIMARY KEY(id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE nstats_ctf_flag_pickups (
id int NOT NULL AUTO_INCREMENT,
match_id int NOT NULL,
match_date int NOT NULL,
map_id int NOT NULL,
cap_id int NOT NULL,
timestamp float NOT NULL,
player_id int NOT NULL,
player_team int NOT NULL,
flag_team int NOT NULL,
PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE nstats_ctf_cr_kills (
id int NOT NULL AUTO_INCREMENT,
match_id int NOT NULL,
match_date int NOT NULL,
map_id int NOT NULL,
cap_id int NOT NULL,
event_type int NOT NULL,
timestamp float NOT NULL,
player_id int NOT NULL,
player_team int NOT NULL,
total_events int NOT NULL,
PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_ctf_events (
id int(11) NOT NULL AUTO_INCREMENT,
match_id int(11) NOT NULL,
timestamp float NOT NULL,
player int(11) NOT NULL,
event varchar(30) NOT NULL,
team int(11) NOT NULL
,PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_dom_control_points (
id int(11) NOT NULL AUTO_INCREMENT,
map int(11) NOT NULL,
name varchar(100) NOT NULL,
captured int(11) NOT NULL,
matches int(11) NOT NULL,
x float NOT NULL,
y float NOT NULL,
z float NOT NULL
,PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_dom_match_caps (
id int(11) NOT NULL AUTO_INCREMENT,
match_id int(11) NOT NULL,
time float NOT NULL,
player int(11) NOT NULL,
point int(11) NOT NULL,
team int(11) NOT NULL
,PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_dom_match_control_points (
id int(11) NOT NULL AUTO_INCREMENT,
match_id int(11) NOT NULL,
map int(11) NOT NULL,
name varchar(100) NOT NULL,
captured int(11) NOT NULL
,PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_dom_match_player_score (
id int(11) NOT NULL AUTO_INCREMENT,
match_id int(11) NOT NULL,
timestamp float NOT NULL,
player int(11) NOT NULL,
score int(11) NOT NULL
,PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_faces (
id int(11) NOT NULL AUTO_INCREMENT,
name varchar(100) NOT NULL,
first int(11) NOT NULL,
last int(11) NOT NULL,
uses int(11) NOT NULL
,PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_ftp (
id int(11) NOT NULL AUTO_INCREMENT,
name varchar(100) NOT NULL,
host varchar(250) NOT NULL,
port int(11) NOT NULL,
user varchar(50) NOT NULL,
password varchar(50) NOT NULL,
target_folder varchar(250) NOT NULL,
delete_after_import tinyint(1) NOT NULL,
first int(11) NOT NULL,
last int(11) NOT NULL,
total_imports int(11) NOT NULL,
delete_tmp_files int(1) NOT NULL,
total_logs_imported int(11) NOT NULL,
ignore_bots int(1) NOT NULL,
ignore_duplicates int(1) NOT NULL,
min_players int(2) NOT NULL,
min_playtime int(11) NOT NULL,
sftp int(1) NOT NULL,
import_ace INT(1) NOT NULL,
delete_ace_logs int(1) NOT NULL,
delete_ace_screenshots int(1) NOT NULL,
total_ace_kick_logs INT(1) NOT NULL,
total_ace_join_logs INT(1) NOT NULL,
total_ace_screenshots INT(1) NOT NULL,
enabled INT(1) NOT NULL,
use_ace_player_hwid INT(1) NOT NULL
,PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_logs_folder (
id int(11) NOT NULL AUTO_INCREMENT,
name varchar(100) NOT NULL,
first int(11) NOT NULL,
last int(11) NOT NULL,
total_imports int(11) NOT NULL,
total_logs_imported int(11) NOT NULL,
ignore_bots int(1) NOT NULL,
ignore_duplicates int(1) NOT NULL,
min_players int(2) NOT NULL,
min_playtime int(11) NOT NULL,
import_ace INT(1) NOT NULL,
total_ace_kick_logs INT(1) NOT NULL,
total_ace_join_logs INT(1) NOT NULL,
total_ace_screenshots INT(1) NOT NULL,
use_ace_player_hwid INT(1) NOT NULL
,PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_gametypes (
id int(11) NOT NULL AUTO_INCREMENT,
name varchar(100) NOT NULL,
first int(11) NOT NULL,
last int(11) NOT NULL,
matches int(11) NOT NULL,
playtime double NOT NULL,
auto_merge_id int(11) NOT NULL
,PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_headshots (
id int(11) NOT NULL AUTO_INCREMENT,
match_id int(11) NOT NULL,
timestamp float NOT NULL,
killer int(11) NOT NULL,
victim int(11) NOT NULL,
distance float NOT NULL,
killer_team int(11) NOT NULL,
victim_team int(11) NOT NULL
,PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_items (
id int(11) NOT NULL AUTO_INCREMENT,
name varchar(100) NOT NULL,
display_name varchar(100) NOT NULL,
first int(11) NOT NULL,
last int(11) NOT NULL,
uses int(11) NOT NULL,
matches int(11) NOT NULL,
type int(11) NOT NULL
,PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_items_match (
id int(11) NOT NULL AUTO_INCREMENT,
match_id int(11) NOT NULL,
player_id int(11) NOT NULL,
item int(11) NOT NULL,
uses int(11) NOT NULL
,PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
`,
`CREATE TABLE IF NOT EXISTS nstats_items_player (
id int(11) NOT NULL AUTO_INCREMENT,
player int(11) NOT NULL,
item int(11) NOT NULL,
first int(11) NOT NULL,
last int(11) NOT NULL,
uses int(11) NOT NULL,
matches int(11) NOT NULL
,PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_kills (
id BIGINT NOT NULL AUTO_INCREMENT,
match_id int(11) NOT NULL,
timestamp float NOT NULL,
killer int(11) NOT NULL,
killer_team int(11) NOT NULL,
victim int(11) NOT NULL,
victim_team int(11) NOT NULL,
killer_weapon int(11) NOT NULL,
victim_weapon int(11) NOT NULL,
distance float NOT NULL,
killer_x float NOT NULL,
killer_y float NOT NULL,
killer_z float NOT NULL,
victim_x float NOT NULL,
victim_y float NOT NULL,
victim_z float NOT NULL
,PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_logs (
id int(11) NOT NULL AUTO_INCREMENT,
name varchar(100) NOT NULL,
imported int(11) NOT NULL,
match_id int(11) NOT NULL
,PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_maps (
id int(11) NOT NULL AUTO_INCREMENT,
name varchar(100) NOT NULL,
title varchar(100) NOT NULL,
author varchar(100) NOT NULL,
ideal_player_count varchar(100) NOT NULL,
level_enter_text varchar(100) NOT NULL,
first int(11) NOT NULL,
last int(11) NOT NULL,
matches int(11) NOT NULL,
playtime double NOT NULL,
import_as_id int(11) NOT NULL
,PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_maps_flags (
id int(11) NOT NULL AUTO_INCREMENT,
map int(11) NOT NULL,
team int(11) NOT NULL,
x float NOT NULL,
y float NOT NULL,
z float NOT NULL
,PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_map_spawns (
id int(11) NOT NULL AUTO_INCREMENT,
name varchar(50) NOT NULL,
map int(11) NOT NULL,
x double NOT NULL,
y double NOT NULL,
z double NOT NULL,
spawns int(11) NOT NULL,
team int(11) NOT NULL
,PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_matches (
id int(11) NOT NULL AUTO_INCREMENT,
match_hash varchar(32) NOT NULL,
date int(11) NOT NULL,
server int(11) NOT NULL,
gametype int(11) NOT NULL,
map int(11) NOT NULL,
version int(11) NOT NULL,
min_version int(11) NOT NULL,
admin varchar(50) NOT NULL,
email varchar(100) NOT NULL,
region int(11) NOT NULL,
motd text NOT NULL,
mutators text NOT NULL,
playtime float NOT NULL,
end_type varchar(50) NOT NULL,
start float NOT NULL,
end float NOT NULL,
insta int(11) NOT NULL,
team_game int(11) NOT NULL,
game_speed int(11) NOT NULL,
hardcore int(11) NOT NULL,
tournament int(11) NOT NULL,
air_control float NOT NULL,
use_translocator int(11) NOT NULL,
friendly_fire_scale float NOT NULL,
net_mode varchar(100) NOT NULL,
max_spectators int(11) NOT NULL,
max_players int(11) NOT NULL,
total_teams int(11) NOT NULL,
players int(11) NOT NULL,
time_limit int(11) NOT NULL,
target_score int(11) NOT NULL,
dm_winner int(11) NOT NULL,
dm_score int(11) NOT NULL,
team_score_0 float NOT NULL,
team_score_1 float NOT NULL,
team_score_2 float NOT NULL,
team_score_3 float NOT NULL,
attacking_team int(11) NOT NULL,
assault_caps int(11) NOT NULL,
dom_caps int(11) NOT NULL,
mh_kills int(11) NOT NULL,
mh int(11) NOT NULL,
views int(11) NOT NULL,
ping_min_average float NOT NULL,
ping_average_average float NOT NULL,
ping_max_average float NOT NULL,
amp_kills int(11) NOT NULL,
amp_kills_team_0 int(11) NOT NULL,
amp_kills_team_1 int(11) NOT NULL,
amp_kills_team_2 int(11) NOT NULL,
amp_kills_team_3 int(11) NOT NULL
,PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_match_connections (
id int(11) NOT NULL AUTO_INCREMENT,
match_id int(11) NOT NULL,
timestamp float NOT NULL,
player int(11) NOT NULL,
event tinyint(4) NOT NULL
,PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_match_pings (
id int(11) NOT NULL AUTO_INCREMENT,
match_id int(11) NOT NULL,
timestamp int(11) NOT NULL,
player int(11) NOT NULL,
ping int(11) NOT NULL
,PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_match_player_score (
id int(11) NOT NULL AUTO_INCREMENT,
match_id int(11) NOT NULL,
timestamp float NOT NULL,
player int(11) NOT NULL,
score int(11) NOT NULL
,PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
`,
`CREATE TABLE IF NOT EXISTS nstats_match_team_changes (
id int(11) NOT NULL AUTO_INCREMENT,
match_id int(11) NOT NULL,
timestamp float NOT NULL,
player int(11) NOT NULL,
team int(11) NOT NULL
,PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
`,
`CREATE TABLE IF NOT EXISTS nstats_monsters (
id int(11) NOT NULL AUTO_INCREMENT,
class_name varchar(150) COLLATE utf8_unicode_ci NOT NULL,
display_name varchar(50) COLLATE utf8_unicode_ci NOT NULL,
matches int(11) NOT NULL,
deaths int(11) NOT NULL,
kills int(11) NOT NULL
,PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_monsters_match (
id int(11) NOT NULL AUTO_INCREMENT,
match_id int(11) NOT NULL,
monster int(11) NOT NULL,
deaths int(11) NOT NULL,
kills int(11) NOT NULL
,PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_monsters_player_match (
id int(11) NOT NULL AUTO_INCREMENT,
match_id int(11) NOT NULL,
player int(11) NOT NULL,
monster int(11) NOT NULL,
kills int(11) NOT NULL,
deaths int(11) NOT NULL
,PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_monsters_player_totals (
id int(11) NOT NULL AUTO_INCREMENT,
player int(11) NOT NULL,
monster int(11) NOT NULL,
matches int(11) NOT NULL,
kills int(11) NOT NULL,
deaths int(11) NOT NULL
,PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_monster_kills (
id int(11) NOT NULL AUTO_INCREMENT,
match_id int(11) NOT NULL,
timestamp float NOT NULL,
monster int(11) NOT NULL,
player int(11) NOT NULL
,PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_nexgen_stats_viewer (
id int(11) NOT NULL AUTO_INCREMENT,
title varchar(100) COLLATE utf8_unicode_ci NOT NULL,
type int(11) NOT NULL,
gametype int(11) NOT NULL,
players int(11) NOT NULL,
position int(11) NOT NULL,
enabled tinyint(1) NOT NULL
,PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_player_maps (
id int(11) NOT NULL AUTO_INCREMENT,
map int(11) NOT NULL,
player int(11) NOT NULL,
first int(11) NOT NULL,
first_id int(11) NOT NULL,
last int(11) NOT NULL,
last_id int(11) NOT NULL,
matches int(11) NOT NULL,
playtime double NOT NULL,
longest float NOT NULL,
longest_id int(11) NOT NULL
,PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_player_matches (
id int(11) NOT NULL AUTO_INCREMENT,
match_id int(11) NOT NULL,
match_date int(11) NOT NULL,
map_id int(11) NOT NULL,
player_id int(11) NOT NULL,
hwid varchar(32) NOT NULL,
bot tinyint(1) NOT NULL,
spectator tinyint(1) NOT NULL,
played tinyint(1) NOT NULL,
ip varchar(50) NOT NULL,
country varchar(5) NOT NULL,
face int(11) NOT NULL,
voice int(11) NOT NULL,
gametype int(11) NOT NULL,
winner int(11) NOT NULL,
draw int(11) NOT NULL,
playtime float NOT NULL,
team_0_playtime float NOT NULL,
team_1_playtime float NOT NULL,
team_2_playtime float NOT NULL,
team_3_playtime float NOT NULL,
spec_playtime float NOT NULL,
team int(1) NOT NULL,
first_blood int(1) NOT NULL,
frags int(11) NOT NULL,
score int(11) NOT NULL,
kills int(11) NOT NULL,
deaths int(11) NOT NULL,
suicides int(11) NOT NULL,
team_kills int(11) NOT NULL,
spawn_kills int(11) NOT NULL,
efficiency float NOT NULL,
multi_1 int(11) NOT NULL,
multi_2 int(11) NOT NULL,
multi_3 int(11) NOT NULL,
multi_4 int(11) NOT NULL,
multi_5 int(11) NOT NULL,
multi_6 int(11) NOT NULL,
multi_7 int(11) NOT NULL,
multi_best int(11) NOT NULL,
spree_1 int(11) NOT NULL,
spree_2 int(11) NOT NULL,
spree_3 int(11) NOT NULL,
spree_4 int(11) NOT NULL,
spree_5 int(11) NOT NULL,
spree_6 int(11) NOT NULL,
spree_7 int(11) NOT NULL,
spree_best int(11) NOT NULL,
best_spawn_kill_spree int(11) NOT NULL,
assault_objectives int(11) NOT NULL,
dom_caps int(11) NOT NULL,
dom_caps_best_life int(11) NOT NULL,
ping_min int(11) NOT NULL,
ping_average int(11) NOT NULL,
ping_max int(11) NOT NULL,
accuracy float NOT NULL,
shortest_kill_distance float NOT NULL,
average_kill_distance float NOT NULL,
longest_kill_distance float NOT NULL,
k_distance_normal int(11) NOT NULL,
k_distance_long int(11) NOT NULL,
k_distance_uber int(11) NOT NULL,
headshots int(11) NOT NULL,
shield_belt int(11) NOT NULL,
amp int(11) NOT NULL,
amp_time float NOT NULL,
invisibility int(11) NOT NULL,
invisibility_time float NOT NULL,
pads int(11) NOT NULL,
armor int(11) NOT NULL,
boots int(11) NOT NULL,
super_health int(11) NOT NULL,
mh_kills int(11) NOT NULL,
mh_kills_best_life int(11) NOT NULL,
views int(11) NOT NULL,
mh_deaths int(11) NOT NULL,
telefrag_kills int(11) NOT NULL,
telefrag_deaths int(11) NOT NULL,
telefrag_best_spree int(11) NOT NULL,
telefrag_best_multi int(11) NOT NULL,
tele_disc_kills int(11) NOT NULL,
tele_disc_deaths int(11) NOT NULL,
tele_disc_best_spree int(11) NOT NULL,
tele_disc_best_multi int(11) NOT NULL
,PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_player_totals (
id int(11) NOT NULL AUTO_INCREMENT,
hwid varchar(32) NOT NULL,
name varchar(30) NOT NULL,
player_id int(11) NOT NULL,
first int(11) NOT NULL,
last int(11) NOT NULL,
ip varchar(50) NOT NULL,
country varchar(2) NOT NULL,
face int(100) NOT NULL,
voice int(11) NOT NULL,
gametype int(11) NOT NULL,
map int(11) NOT NULL,
matches int(11) NOT NULL,
wins int(11) NOT NULL,
losses int(11) NOT NULL,
draws int(11) NOT NULL,
winrate float NOT NULL,
playtime double NOT NULL,
team_0_playtime float NOT NULL,
team_1_playtime float NOT NULL,
team_2_playtime float NOT NULL,
team_3_playtime float NOT NULL,
spec_playtime float NOT NULL,
first_bloods int(11) NOT NULL,
frags int(11) NOT NULL,
score int(11) NOT NULL,
kills int(11) NOT NULL,
deaths int(11) NOT NULL,
suicides int(11) NOT NULL,
team_kills int(11) NOT NULL,
spawn_kills int(11) NOT NULL,
efficiency float NOT NULL,
multi_1 int(11) NOT NULL,
multi_2 int(11) NOT NULL,
multi_3 int(11) NOT NULL,
multi_4 int(11) NOT NULL,
multi_5 int(11) NOT NULL,
multi_6 int(11) NOT NULL,
multi_7 int(11) NOT NULL,
multi_best int(11) NOT NULL,
spree_1 int(11) NOT NULL,
spree_2 int(11) NOT NULL,
spree_3 int(11) NOT NULL,
spree_4 int(11) NOT NULL,
spree_5 int(11) NOT NULL,
spree_6 int(11) NOT NULL,
spree_7 int(11) NOT NULL,
spree_best int(11) NOT NULL,
fastest_kill float NOT NULL,
slowest_kill float NOT NULL,
best_spawn_kill_spree int(11) NOT NULL,
assault_objectives int(11) NOT NULL,
dom_caps int(11) NOT NULL,
dom_caps_best int(11) NOT NULL,
dom_caps_best_life int(11) NOT NULL,
accuracy float NOT NULL,
k_distance_normal int(11) NOT NULL,
k_distance_long int(11) NOT NULL,
k_distance_uber int(11) NOT NULL,
headshots int(11) NOT NULL,
shield_belt int(11) NOT NULL,
amp int(11) NOT NULL,
amp_time float NOT NULL,
invisibility int(11) NOT NULL,
invisibility_time float NOT NULL,
pads int(11) NOT NULL,
armor int(11) NOT NULL,
boots int(11) NOT NULL,
super_health int(11) NOT NULL,
mh_kills int(11) NOT NULL,
mh_kills_best_life int(11) NOT NULL,
mh_kills_best int(11) NOT NULL,
views int(11) NOT NULL,
mh_deaths int(11) NOT NULL,
mh_deaths_worst int(11) NOT NULL
,PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_player_weapon_match (
id int(11) NOT NULL AUTO_INCREMENT,
match_id int(11) NOT NULL,
map_id int(11) NOT NULL,
gametype_id int(11) NOT NULL,
player_id int(11) NOT NULL,
weapon_id int(11) NOT NULL,
kills int(11) NOT NULL,
best_kills int(11) NOT NULL,
deaths int(11) NOT NULL,
suicides int(11) NOT NULL,
team_kills int(11) NOT NULL,
best_team_kills int(11) NOT NULL,
accuracy float NOT NULL,
shots int(11) NOT NULL,
hits int(11) NOT NULL,
damage bigint(11) NOT NULL,
efficiency float NOT NULL
,PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_player_weapon_totals (
id int(11) NOT NULL AUTO_INCREMENT,
player_id int(11) NOT NULL,
map_id int(11) NOT NULL,
gametype int(11) NOT NULL,
playtime FLOAT NOT NULL,
weapon int(11) NOT NULL,
kills int(11) NOT NULL,
team_kills int(11) NOT NULL,
deaths int(11) NOT NULL,
suicides int(11) NOT NULL,
efficiency float NOT NULL,
accuracy float NOT NULL,
shots int(11) NOT NULL,
hits int(11) NOT NULL,
damage bigint NOT NULL,
matches int(11) NOT NULL
,PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_player_weapon_best (
id int(11) NOT NULL AUTO_INCREMENT,
player_id int(11) NOT NULL,
map_id int(11) NOT NULL,
gametype_id int(11) NOT NULL,
weapon_id int(11) NOT NULL,
kills int(11) NOT NULL,
kills_best_life int(11) NOT NULL,
team_kills int(11) NOT NULL,
team_kills_best_life int(11) NOT NULL,
deaths int(11) NOT NULL,
suicides int(11) NOT NULL,
efficiency int(11) NOT NULL,
accuracy float NOT NULL,
shots int(11) NOT NULL,
hits int(11) NOT NULL,
damage bigint NOT NULL
,PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_ranking_player_current (
id int(11) NOT NULL AUTO_INCREMENT,
player_id int(11) NOT NULL,
gametype int(11) NOT NULL,
matches int(11) NOT NULL,
playtime float NOT NULL,
ranking Decimal(10,4) NOT NULL,
ranking_change Decimal(10,4) NOT NULL,
last_active int(11) NOT NULl
,PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_ranking_player_history (
id int(11) NOT NULL AUTO_INCREMENT,
match_id int(11) NOT NULL,
player_id int(11) NOT NULL,
gametype int(11) NOT NULL,
ranking Decimal(10,4) NOT NULL,
match_ranking Decimal(10,4) NOT NULL,
ranking_change Decimal(10,4) NOT NULL,
match_ranking_change Decimal(10,4) NOT NULL
,PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_ranking_values (
id int(11) NOT NULL AUTO_INCREMENT,
name varchar(30) NOT NULL,
display_name varchar(75) NOT NULL,
description varchar(250) NOT NULL,
value float NOT NULL
,PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_servers (
id int(11) NOT NULL AUTO_INCREMENT,
name varchar(100) NOT NULL,
ip varchar(100) NOT NULL,
port int(5) NOT NULL,
first int(11) NOT NULL,
last int(11) NOT NULL,
matches int(11) NOT NULL,
playtime double NOT NULL,
display_name varchar(100) NOT NULL,
display_address varchar(100) NOT NULL,
password varchar(100) NOT NULL,
country varchar(2) NOT NULL,
last_match_id INT(11) NOT NULL,
last_map_id INT(11) NOT NULL
,PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_sessions (
id int(11) NOT NULL AUTO_INCREMENT,
date int(11) NOT NULL,
user int(11) NOT NULL,
hash varchar(64) NOT NULL,
created int(11) NOT NULL,
expires int(11) NOT NULL,
login_ip varchar(50) NOT NULL
,PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_site_settings (
id int(11) NOT NULL AUTO_INCREMENT,
category varchar(50) NOT NULL,
name varchar(100) NOT NULL,
value varchar(100) NOT NULL,
page_order INT(11) NOT NULL
,PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_sprees (
id int(11) NOT NULL AUTO_INCREMENT,
match_id int(11) NOT NULL,
player int(11) NOT NULL,
kills int(11) NOT NULL,
start_timestamp float NOT NULL,
end_timestamp float NOT NULL,
total_time float NOT NULL,
killer int(11) NOT NULL
,PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_users (
id int(11) NOT NULL AUTO_INCREMENT,
name varchar(20) NOT NULL,
password varchar(64) NOT NULL,
joined int(11) NOT NULL,
activated int(1) NOT NULL,
logins int(11) NOT NULL,
admin int(11) NOT NULL,
last_login int(11) NOT NULL,
last_active int(11) NOT NULL,
last_ip varchar(50) NOT NULL,
banned int(11) NOT NULL,
upload_images int(11) NOT NULL
,PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_voices (
id int(11) NOT NULL AUTO_INCREMENT,
name varchar(100) NOT NULL,
first int(11) NOT NULL,
last int(11) NOT NULL,
uses int(11) NOT NULL
,PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_weapons (
id int(11) NOT NULL AUTO_INCREMENT,
name varchar(100) NOT NULL,
matches int(11) NOT NULL,
kills int(11) NOT NULL,
deaths int(11) NOT NULL,
accuracy float NOT NULL,
shots int(11) NOT NULL,
hits int(11) NOT NULL,
damage bigint(20) NOT NULL
,PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_winrates (
id int(11) NOT NULL AUTO_INCREMENT,
date int(11) NOT NULL,
match_id int(11) NOT NULL,
player int(11) NOT NULL,
gametype int(11) NOT NULL,
map int(11) NOT NULL,
match_result int(11) NOT NULL,
matches int(11) NOT NULL,
wins int(11) NOT NULL,
draws int(11) NOT NULL,
losses int(11) NOT NULL,
winrate float NOT NULL,
current_win_streak int(11) NOT NULL,
current_draw_streak int(11) NOT NULL,
current_lose_streak int(11) NOT NULL,
max_win_streak int(11) NOT NULL,
max_draw_streak int(11) NOT NULL,
max_lose_streak int(11) NOT NULL
,PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_winrates_latest (
id int(11) NOT NULL AUTO_INCREMENT,
date int(11) NOT NULL,
match_id int(11) NOT NULL,
player int(11) NOT NULL,
gametype int(11) NOT NULL,
map int(11) NOT NULL,
matches int(11) NOT NULL,
wins int(11) NOT NULL,
draws int(11) NOT NULL,
losses int(11) NOT NULL,
winrate float NOT NULL,
current_win_streak int(11) NOT NULL,
current_draw_streak int(11) NOT NULL,
current_lose_streak int(11) NOT NULL,
max_win_streak int(11) NOT NULL,
max_draw_streak int(11) NOT NULL,
max_lose_streak int(11) NOT NULL
,PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_hits (
id int(11) NOT NULL AUTO_INCREMENT,
ip varchar(50) NOT NULL,
date int(11) NOT NULL,
PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_visitors (
id int(11) NOT NULL AUTO_INCREMENT,
ip varchar(50) NOT NULL,
first int(11) NOT NULL,
last int(11) NOT NULL,
total int(11) NOT NULL,
PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_visitors_countries (
id int(11) NOT NULL AUTO_INCREMENT,
code varchar(2) NOT NULL,
country varchar(100) NOT NULL,
first int(11) NOT NULL,
last int(11) NOT NULL,
total int(11) NOT NULL,
PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_user_agents (
id int(11) NOT NULL AUTO_INCREMENT,
system_name varchar(100) NOT NULL,
browser varchar(100) NOT NULL,
first int(11) NOT NULL,
last int(11) NOT NULL,
total int(11) NOT NULL,
PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_ace_joins (
id int(11) NOT NULL AUTO_INCREMENT,
log_file varchar(255) NOT NULL,
ace_version varchar(50) NOT NULL,
timestamp int(11) NOT NULL,
player varchar(30) NOT NULL,
ip varchar(50) NOT NULL,
country varchar(2) NOT NULL,
os varchar(250) NOT NULL,
mac1 varchar(32) NOT NULL,
mac2 varchar(32) NOT NULL,
hwid varchar(32) NOT NULL
,PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_ace_kicks (
id int(11) NOT NULL AUTO_INCREMENT,
file varchar(255) NOT NULL,
raw_data LONGTEXT NOT NULL,
name varchar(30) NOT NULL,
ace_version varchar(20) NOT NULL,
ip varchar(50) NOT NULL,
country varchar(2) NOT NULL,
os varchar(100) NOT NULL,
cpu varchar(100) NOT NULL,
cpu_speed decimal(10,5) NOT NULL,
nic_desc varchar(100) NOT NULL,
mac1 varchar(32) NOT NULL,
mac2 varchar(32) NOT NULL,
hwid varchar(32) NOT NULL,
game_version varchar(100) NOT NULL,
renderer varchar(100) NOT NULL,
sound_device varchar(100) NOT NULL,
command_line varchar(255) NOT NULL,
timestamp int(11) NOT NULL,
kick_reason varchar(100) NOT NULL,
package_name varchar(100) NOT NULL,
package_path varchar(100) NOT NULL,
package_size int(11) NOT NULL,
package_hash varchar(32) NOT NULL,
package_version varchar(100) NOT NULL,
screenshot_file varchar(255) NOT NULL,
screenshot_status varchar(100) NOT NULL,
PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;`,
`CREATE TABLE IF NOT EXISTS nstats_ace_players (