forked from TOMMMMMMMMMC/GreatPosterWall
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gazelle.sql
3315 lines (3105 loc) · 177 KB
/
gazelle.sql
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
SET NAMES utf8;
SET FOREIGN_KEY_CHECKS = 0;
USE gazelle;
-- ----------------------------
-- Table structure for activity
-- ----------------------------
DROP TABLE IF EXISTS `activity`;
CREATE TABLE `activity` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`Text` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`Time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP,
`Display` tinyint(1) NOT NULL DEFAULT 0,
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for api_applications
-- ----------------------------
DROP TABLE IF EXISTS `api_applications`;
CREATE TABLE `api_applications` (
`ID` int(10) NOT NULL AUTO_INCREMENT,
`UserID` int(10) NOT NULL,
`Token` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`Name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for api_users
-- ----------------------------
DROP TABLE IF EXISTS `api_users`;
CREATE TABLE `api_users` (
`UserID` int(10) NOT NULL,
`AppID` int(10) NOT NULL,
`Token` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`State` enum('0','1','2') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0',
`Time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0),
`Access` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
PRIMARY KEY (`UserID`, `AppID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for applicant
-- ----------------------------
DROP TABLE IF EXISTS `applicant`;
CREATE TABLE `applicant` (
`ID` int(4) UNSIGNED NOT NULL AUTO_INCREMENT,
`RoleID` int(4) UNSIGNED NOT NULL,
`UserID` int(10) UNSIGNED NOT NULL,
`ThreadID` int(6) UNSIGNED NOT NULL,
`Body` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`Created` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP,
`Modified` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP,
`Resolved` tinyint(4) NOT NULL DEFAULT 0,
PRIMARY KEY (`ID`) USING BTREE,
INDEX `RoleID`(`RoleID`) USING BTREE,
INDEX `ThreadID`(`ThreadID`) USING BTREE,
INDEX `UserID`(`UserID`) USING BTREE,
CONSTRAINT `applicant_ibfk_1` FOREIGN KEY (`RoleID`) REFERENCES `applicant_role` (`ID`) ON DELETE RESTRICT ON UPDATE RESTRICT,
CONSTRAINT `applicant_ibfk_2` FOREIGN KEY (`ThreadID`) REFERENCES `thread` (`ID`) ON DELETE RESTRICT ON UPDATE RESTRICT,
CONSTRAINT `applicant_ibfk_3` FOREIGN KEY (`UserID`) REFERENCES `users_main` (`ID`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for applicant_role
-- ----------------------------
DROP TABLE IF EXISTS `applicant_role`;
CREATE TABLE `applicant_role` (
`ID` int(4) UNSIGNED NOT NULL AUTO_INCREMENT,
`Title` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`Published` tinyint(4) NOT NULL DEFAULT 0,
`Description` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`UserID` int(10) UNSIGNED NOT NULL,
`Created` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP,
`Modified` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`ID`) USING BTREE,
INDEX `UserID`(`UserID`) USING BTREE,
CONSTRAINT `applicant_role_ibfk_1` FOREIGN KEY (`UserID`) REFERENCES `users_main` (`ID`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for apply_question
-- ----------------------------
DROP TABLE IF EXISTS `apply_question`;
CREATE TABLE `apply_question` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`code` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`iterm_id` bigint(20) NOT NULL,
`sort` int(11) DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for apply_question_answer
-- ----------------------------
DROP TABLE IF EXISTS `apply_question_answer`;
CREATE TABLE `apply_question_answer` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`iterm_id` bigint(20) DEFAULT NULL,
`answer` varchar(1024) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
`remark` varchar(1024) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for apply_question_iterm
-- ----------------------------
DROP TABLE IF EXISTS `apply_question_iterm`;
CREATE TABLE `apply_question_iterm` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`title` varchar(1024) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
`description` blob,
`remark` varchar(1024) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
`type` tinyint(4) DEFAULT 0 COMMENT '0-?? 1-?? 2-??',
`allow_empty` tinyint(1) DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for apply_user
-- ----------------------------
DROP TABLE IF EXISTS `apply_user`;
CREATE TABLE `apply_user` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`code` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
`name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
`email` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
`question_code` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
`time` datetime(0) DEFAULT NULL,
`IP` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
`status` int(11) DEFAULT 0 COMMENT '0-??? 1-?? 2-??',
`check_id` bigint(20) DEFAULT NULL,
`check_description` varchar(1024) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
`check_time` datetime(0) DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for apply_user_answer
-- ----------------------------
DROP TABLE IF EXISTS `apply_user_answer`;
CREATE TABLE `apply_user_answer` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`apply_id` bigint(20) DEFAULT NULL,
`question_code` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
`iterm_id` bigint(20) DEFAULT NULL,
`answer` blob,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for artists_alias
-- ----------------------------
DROP TABLE IF EXISTS `artists_alias`;
CREATE TABLE `artists_alias` (
`AliasID` int(10) NOT NULL AUTO_INCREMENT,
`ArtistID` int(10) NOT NULL,
`Name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
`Redirect` int(10) NOT NULL DEFAULT 0,
`UserID` int(10) UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`AliasID`) USING BTREE,
INDEX `ArtistID`(`ArtistID`, `Name`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 247 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for artists_group
-- ----------------------------
DROP TABLE IF EXISTS `artists_group`;
CREATE TABLE `artists_group` (
`ArtistID` int(10) NOT NULL AUTO_INCREMENT,
`Name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
`RevisionID` int(12) DEFAULT NULL,
`VanityHouse` tinyint(1) NOT NULL,
`LastCommentID` int(10) NOT NULL DEFAULT 0,
PRIMARY KEY (`ArtistID`) USING BTREE,
INDEX `Name`(`Name`, `RevisionID`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 247 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for artists_similar
-- ----------------------------
DROP TABLE IF EXISTS `artists_similar`;
CREATE TABLE `artists_similar` (
`ArtistID` int(10) NOT NULL DEFAULT 0,
`SimilarID` int(12) NOT NULL DEFAULT 0,
PRIMARY KEY (`ArtistID`, `SimilarID`) USING BTREE,
INDEX `ArtistID`(`ArtistID`, `SimilarID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for artists_similar_scores
-- ----------------------------
DROP TABLE IF EXISTS `artists_similar_scores`;
CREATE TABLE `artists_similar_scores` (
`SimilarID` int(12) NOT NULL AUTO_INCREMENT,
`Score` int(10) NOT NULL DEFAULT 0,
PRIMARY KEY (`SimilarID`) USING BTREE,
INDEX `Score`(`Score`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for artists_similar_votes
-- ----------------------------
DROP TABLE IF EXISTS `artists_similar_votes`;
CREATE TABLE `artists_similar_votes` (
`SimilarID` int(12) NOT NULL,
`UserID` int(10) NOT NULL,
`Way` enum('up','down') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'up',
PRIMARY KEY (`SimilarID`, `UserID`, `Way`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for artists_tags
-- ----------------------------
DROP TABLE IF EXISTS `artists_tags`;
CREATE TABLE `artists_tags` (
`TagID` int(10) NOT NULL DEFAULT 0,
`ArtistID` int(10) NOT NULL DEFAULT 0,
`PositiveVotes` int(6) NOT NULL DEFAULT 1,
`NegativeVotes` int(6) NOT NULL DEFAULT 1,
`UserID` int(10) NOT NULL,
PRIMARY KEY (`TagID`, `ArtistID`) USING BTREE,
INDEX `TagID`(`TagID`, `ArtistID`, `PositiveVotes`, `NegativeVotes`, `UserID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for bad_passwords
-- ----------------------------
DROP TABLE IF EXISTS `bad_passwords`;
CREATE TABLE `bad_passwords` (
`Password` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
PRIMARY KEY (`Password`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for badges
-- ----------------------------
DROP TABLE IF EXISTS `badges`;
CREATE TABLE `badges` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`UserID` int(11) NOT NULL,
`BadgeID` int(11) NOT NULL,
`Time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP,
`Username` int(11) NOT NULL DEFAULT 0,
`Profile` int(11) NOT NULL DEFAULT 0,
PRIMARY KEY (`ID`) USING BTREE,
UNIQUE INDEX `UserID`(`UserID`, `BadgeID`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 25639 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for badges_item
-- ----------------------------
DROP TABLE IF EXISTS `badges_item`;
CREATE TABLE `badges_item` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`Label` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`BigImage` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`SmallImage` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`Level` int(11) NOT NULL,
`Count` int(11) NOT NULL,
PRIMARY KEY (`ID`) USING BTREE,
UNIQUE INDEX `Label`(`Label`, `Level`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 136 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for badges_label
-- ----------------------------
DROP TABLE IF EXISTS `badges_label`;
CREATE TABLE `badges_label` (
`Label` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`DisImage` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`Remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`Type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`Auto` tinyint(1) NOT NULL DEFAULT 0,
`Rank` int(11) NOT NULL,
`Father` tinyint(1) NOT NULL DEFAULT 1,
`Progress` tinyint(1) NOT NULL DEFAULT 1,
PRIMARY KEY (`Label`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for blog
-- ----------------------------
DROP TABLE IF EXISTS `blog`;
CREATE TABLE `blog` (
`ID` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`UserID` int(10) UNSIGNED NOT NULL,
`Title` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`Body` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`Time` datetime(0) NOT NULL,
`ThreadID` int(10) UNSIGNED DEFAULT NULL,
`Important` tinyint(4) NOT NULL DEFAULT 0,
PRIMARY KEY (`ID`) USING BTREE,
INDEX `UserID`(`UserID`) USING BTREE,
INDEX `Time`(`Time`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for bonus_history
-- ----------------------------
DROP TABLE IF EXISTS `bonus_history`;
CREATE TABLE `bonus_history` (
`ID` int(6) UNSIGNED NOT NULL AUTO_INCREMENT,
`ItemID` int(6) UNSIGNED NOT NULL,
`UserID` int(10) UNSIGNED NOT NULL,
`Price` int(10) UNSIGNED NOT NULL,
`OtherUserID` int(10) UNSIGNED DEFAULT NULL,
`PurchaseDate` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`ID`) USING BTREE,
INDEX `bonus_history_fk_user`(`UserID`) USING BTREE,
INDEX `bonus_history_fk_item`(`ItemID`) USING BTREE,
CONSTRAINT `bonus_history_fk_item` FOREIGN KEY (`ItemID`) REFERENCES `bonus_item` (`ID`) ON DELETE RESTRICT ON UPDATE RESTRICT,
CONSTRAINT `bonus_history_fk_user` FOREIGN KEY (`UserID`) REFERENCES `users_main` (`ID`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for bonus_item
-- ----------------------------
DROP TABLE IF EXISTS `bonus_item`;
CREATE TABLE `bonus_item` (
`ID` int(6) UNSIGNED NOT NULL AUTO_INCREMENT,
`Price` int(10) UNSIGNED NOT NULL,
`Amount` int(2) UNSIGNED DEFAULT NULL,
`MinClass` int(6) UNSIGNED NOT NULL DEFAULT 0,
`FreeClass` int(6) UNSIGNED NOT NULL DEFAULT 999999,
`OffPrice` int(10) NOT NULL,
`OffClass` int(6) NOT NULL DEFAULT 999999,
`Label` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`Title` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`Rank` int(6) NOT NULL,
PRIMARY KEY (`ID`) USING BTREE,
UNIQUE INDEX `Label`(`Label`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 12 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for bookmarks_artists
-- ----------------------------
DROP TABLE IF EXISTS `bookmarks_artists`;
CREATE TABLE `bookmarks_artists` (
`UserID` int(10) NOT NULL,
`ArtistID` int(10) NOT NULL,
`Time` datetime(0) NOT NULL,
INDEX `UserID`(`UserID`) USING BTREE,
INDEX `ArtistID`(`ArtistID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for bookmarks_collages
-- ----------------------------
DROP TABLE IF EXISTS `bookmarks_collages`;
CREATE TABLE `bookmarks_collages` (
`UserID` int(10) NOT NULL,
`CollageID` int(10) NOT NULL,
`Time` datetime(0) NOT NULL,
INDEX `UserID`(`UserID`) USING BTREE,
INDEX `CollageID`(`CollageID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for bookmarks_requests
-- ----------------------------
DROP TABLE IF EXISTS `bookmarks_requests`;
CREATE TABLE `bookmarks_requests` (
`UserID` int(10) NOT NULL,
`RequestID` int(10) NOT NULL,
`Time` datetime(0) NOT NULL,
INDEX `UserID`(`UserID`) USING BTREE,
INDEX `RequestID`(`RequestID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for bookmarks_torrents
-- ----------------------------
DROP TABLE IF EXISTS `bookmarks_torrents`;
CREATE TABLE `bookmarks_torrents` (
`UserID` int(10) NOT NULL,
`GroupID` int(10) NOT NULL,
`Time` datetime(0) NOT NULL,
`Sort` int(11) NOT NULL DEFAULT 0,
UNIQUE INDEX `groups_users`(`GroupID`, `UserID`) USING BTREE,
INDEX `UserID`(`UserID`) USING BTREE,
INDEX `GroupID`(`GroupID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for calendar
-- ----------------------------
DROP TABLE IF EXISTS `calendar`;
CREATE TABLE `calendar` (
`ID` int(10) NOT NULL AUTO_INCREMENT,
`Title` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
`Body` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci,
`Category` tinyint(1) DEFAULT NULL,
`StartDate` datetime(0) DEFAULT NULL,
`EndDate` datetime(0) DEFAULT NULL,
`AddedBy` int(10) DEFAULT NULL,
`Importance` tinyint(1) DEFAULT NULL,
`Team` tinyint(1) DEFAULT 1,
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for changelog
-- ----------------------------
DROP TABLE IF EXISTS `changelog`;
CREATE TABLE `changelog` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`Time` datetime(0) NOT NULL,
`Message` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`Author` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for collages
-- ----------------------------
DROP TABLE IF EXISTS `collages`;
CREATE TABLE `collages` (
`ID` int(10) NOT NULL AUTO_INCREMENT,
`Name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
`Description` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`UserID` int(10) NOT NULL DEFAULT 0,
`NumTorrents` int(4) NOT NULL DEFAULT 0,
`Deleted` enum('0','1') CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '0',
`Locked` enum('0','1') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0',
`CategoryID` int(2) NOT NULL DEFAULT 1,
`TagList` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
`MaxGroups` int(10) NOT NULL DEFAULT 0,
`MaxGroupsPerUser` int(10) NOT NULL DEFAULT 0,
`Featured` tinyint(4) NOT NULL DEFAULT 0,
`Subscribers` int(10) DEFAULT 0,
`updated` datetime(0) NOT NULL,
PRIMARY KEY (`ID`) USING BTREE,
UNIQUE INDEX `Name`(`Name`) USING BTREE,
INDEX `UserID`(`UserID`) USING BTREE,
INDEX `CategoryID`(`CategoryID`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for collages_artists
-- ----------------------------
DROP TABLE IF EXISTS `collages_artists`;
CREATE TABLE `collages_artists` (
`CollageID` int(10) NOT NULL,
`ArtistID` int(10) NOT NULL,
`UserID` int(10) NOT NULL,
`Sort` int(10) NOT NULL DEFAULT 0,
`AddedOn` datetime(0) NOT NULL,
PRIMARY KEY (`CollageID`, `ArtistID`) USING BTREE,
INDEX `UserID`(`UserID`) USING BTREE,
INDEX `Sort`(`Sort`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for collages_torrents
-- ----------------------------
DROP TABLE IF EXISTS `collages_torrents`;
CREATE TABLE `collages_torrents` (
`CollageID` int(10) NOT NULL,
`GroupID` int(10) NOT NULL,
`UserID` int(10) NOT NULL,
`Sort` int(10) NOT NULL DEFAULT 0,
`AddedOn` datetime(0) NOT NULL,
PRIMARY KEY (`CollageID`, `GroupID`) USING BTREE,
INDEX `UserID`(`UserID`) USING BTREE,
INDEX `Sort`(`Sort`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for comments
-- ----------------------------
DROP TABLE IF EXISTS `comments`;
CREATE TABLE `comments` (
`ID` int(10) NOT NULL AUTO_INCREMENT,
`Page` enum('artist','collages','requests','torrents') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`PageID` int(10) NOT NULL,
`AuthorID` int(10) NOT NULL,
`AddedTime` datetime(0) NOT NULL,
`Body` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci,
`EditedUserID` int(10) DEFAULT NULL,
`EditedTime` datetime(0) DEFAULT NULL,
PRIMARY KEY (`ID`) USING BTREE,
INDEX `Page`(`Page`, `PageID`) USING BTREE,
INDEX `AuthorID`(`AuthorID`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 707 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for comments_edits
-- ----------------------------
DROP TABLE IF EXISTS `comments_edits`;
CREATE TABLE `comments_edits` (
`Page` enum('forums','artist','collages','requests','torrents') CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
`PostID` int(10) DEFAULT NULL,
`EditUser` int(10) DEFAULT NULL,
`EditTime` datetime(0) DEFAULT NULL,
`Body` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci,
INDEX `EditUser`(`EditUser`) USING BTREE,
INDEX `PostHistory`(`Page`, `PostID`, `EditTime`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for comments_edits_tmp
-- ----------------------------
DROP TABLE IF EXISTS `comments_edits_tmp`;
CREATE TABLE `comments_edits_tmp` (
`Page` enum('forums','artist','collages','requests','torrents') CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
`PostID` int(10) DEFAULT NULL,
`EditUser` int(10) DEFAULT NULL,
`EditTime` datetime(0) DEFAULT NULL,
`Body` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci,
INDEX `EditUser`(`EditUser`) USING BTREE,
INDEX `PostHistory`(`Page`, `PostID`, `EditTime`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for concerts
-- ----------------------------
DROP TABLE IF EXISTS `concerts`;
CREATE TABLE `concerts` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`ConcertID` int(10) NOT NULL,
`TopicID` int(10) NOT NULL,
PRIMARY KEY (`ID`) USING BTREE,
INDEX `ConcertID`(`ConcertID`) USING BTREE,
INDEX `TopicID`(`TopicID`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for contest
-- ----------------------------
DROP TABLE IF EXISTS `contest`;
CREATE TABLE `contest` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`ContestTypeID` int(11) NOT NULL,
`Name` varchar(80) CHARACTER SET utf8 COLLATE utf8_swedish_ci NOT NULL,
`Banner` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
`DateBegin` datetime(0) NOT NULL,
`DateEnd` datetime(0) NOT NULL,
`Display` int(11) NOT NULL DEFAULT 50,
`MaxTracked` int(11) NOT NULL DEFAULT 500,
`WikiText` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci,
PRIMARY KEY (`ID`) USING BTREE,
UNIQUE INDEX `Name`(`Name`) USING BTREE,
INDEX `contest_type_fk`(`ContestTypeID`) USING BTREE,
CONSTRAINT `contest_type_fk` FOREIGN KEY (`ContestTypeID`) REFERENCES `contest_type` (`ID`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for contest_leaderboard
-- ----------------------------
DROP TABLE IF EXISTS `contest_leaderboard`;
CREATE TABLE `contest_leaderboard` (
`ContestID` int(11) NOT NULL,
`UserID` int(11) NOT NULL,
`FlacCount` int(11) NOT NULL,
`LastTorrentID` int(11) NOT NULL,
`LastTorrentName` varchar(80) CHARACTER SET utf8 COLLATE utf8_swedish_ci NOT NULL,
`ArtistList` varchar(80) CHARACTER SET utf8 COLLATE utf8_swedish_ci NOT NULL,
`ArtistNames` varchar(200) CHARACTER SET utf8 COLLATE utf8_swedish_ci NOT NULL,
`LastUpload` datetime(0) NOT NULL,
INDEX `contest_fk`(`ContestID`) USING BTREE,
INDEX `flac_upload_idx`(`FlacCount`, `LastUpload`, `UserID`) USING BTREE,
CONSTRAINT `contest_fk` FOREIGN KEY (`ContestID`) REFERENCES `contest` (`ID`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for contest_type
-- ----------------------------
DROP TABLE IF EXISTS `contest_type`;
CREATE TABLE `contest_type` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`Name` varchar(32) CHARACTER SET utf8 COLLATE utf8_swedish_ci NOT NULL,
PRIMARY KEY (`ID`) USING BTREE,
UNIQUE INDEX `Name`(`Name`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_swedish_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for cover_art
-- ----------------------------
DROP TABLE IF EXISTS `cover_art`;
CREATE TABLE `cover_art` (
`ID` int(10) NOT NULL AUTO_INCREMENT,
`GroupID` int(10) NOT NULL,
`Image` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
`Summary` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
`UserID` int(10) NOT NULL DEFAULT 0,
`Time` datetime(0) DEFAULT NULL,
PRIMARY KEY (`ID`) USING BTREE,
UNIQUE INDEX `GroupID`(`GroupID`, `Image`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for currency_conversion_rates
-- ----------------------------
DROP TABLE IF EXISTS `currency_conversion_rates`;
CREATE TABLE `currency_conversion_rates` (
`Currency` char(3) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`Rate` decimal(9, 4) DEFAULT NULL,
`Time` datetime(0) DEFAULT NULL,
PRIMARY KEY (`Currency`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for do_not_upload
-- ----------------------------
DROP TABLE IF EXISTS `do_not_upload`;
CREATE TABLE `do_not_upload` (
`ID` int(10) NOT NULL AUTO_INCREMENT,
`Name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`Comment` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`UserID` int(10) NOT NULL,
`Time` datetime(0) NOT NULL,
`Sequence` mediumint(8) NOT NULL,
PRIMARY KEY (`ID`) USING BTREE,
INDEX `Time`(`Time`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for donations
-- ----------------------------
DROP TABLE IF EXISTS `donations`;
CREATE TABLE `donations` (
`UserID` int(10) NOT NULL,
`Amount` decimal(6, 2) NOT NULL,
`Email` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`Time` datetime(0) NOT NULL,
`Currency` varchar(5) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'USD',
`Source` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
`Reason` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`Rank` int(10) DEFAULT 0,
`AddedBy` int(10) DEFAULT 0,
`TotalRank` int(10) DEFAULT 0,
INDEX `UserID`(`UserID`) USING BTREE,
INDEX `Time`(`Time`) USING BTREE,
INDEX `Amount`(`Amount`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for donations_bitcoin
-- ----------------------------
DROP TABLE IF EXISTS `donations_bitcoin`;
CREATE TABLE `donations_bitcoin` (
`BitcoinAddress` varchar(34) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`Amount` decimal(24, 8) NOT NULL,
INDEX `BitcoinAddress`(`BitcoinAddress`, `Amount`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for donor_forum_usernames
-- ----------------------------
DROP TABLE IF EXISTS `donor_forum_usernames`;
CREATE TABLE `donor_forum_usernames` (
`UserID` int(10) NOT NULL DEFAULT 0,
`Prefix` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
`Suffix` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
`UseComma` tinyint(1) DEFAULT 1,
PRIMARY KEY (`UserID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for donor_rewards
-- ----------------------------
DROP TABLE IF EXISTS `donor_rewards`;
CREATE TABLE `donor_rewards` (
`UserID` int(10) NOT NULL DEFAULT 0,
`IconMouseOverText` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
`AvatarMouseOverText` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
`CustomIcon` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
`SecondAvatar` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
`CustomIconLink` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
`ProfileInfo1` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`ProfileInfo2` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`ProfileInfo3` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`ProfileInfo4` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`ProfileInfoTitle1` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`ProfileInfoTitle2` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`ProfileInfoTitle3` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`ProfileInfoTitle4` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`ColorUsername` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
`GradientsColor` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
PRIMARY KEY (`UserID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for drives
-- ----------------------------
DROP TABLE IF EXISTS `drives`;
CREATE TABLE `drives` (
`DriveID` int(10) NOT NULL AUTO_INCREMENT,
`Name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`Offset` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
PRIMARY KEY (`DriveID`) USING BTREE,
INDEX `Name`(`Name`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for dupe_groups
-- ----------------------------
DROP TABLE IF EXISTS `dupe_groups`;
CREATE TABLE `dupe_groups` (
`ID` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`Comments` text CHARACTER SET utf8 COLLATE utf8_general_ci,
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for email_blacklist
-- ----------------------------
DROP TABLE IF EXISTS `email_blacklist`;
CREATE TABLE `email_blacklist` (
`ID` int(10) NOT NULL AUTO_INCREMENT,
`UserID` int(10) NOT NULL,
`Email` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`Time` datetime(0) NOT NULL,
`Comment` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for events_reward_log
-- ----------------------------
DROP TABLE IF EXISTS `events_reward_log`;
CREATE TABLE `events_reward_log` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`UserIDs` text CHARACTER SET utf8 COLLATE utf8_general_ci,
`ByUserID` int(11) DEFAULT NULL,
`Invites` int(11) DEFAULT NULL,
`InvitesTime` datetime(0) DEFAULT NULL,
`Tokens` int(11) DEFAULT NULL,
`TokensTime` datetime(0) DEFAULT NULL,
`Bonus` int(11) DEFAULT NULL,
`Badge` int(11) DEFAULT NULL,
`Remark` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
`Time` datetime(0) DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for featured_albums
-- ----------------------------
DROP TABLE IF EXISTS `featured_albums`;
CREATE TABLE `featured_albums` (
`GroupID` int(10) NOT NULL DEFAULT 0,
`ThreadID` int(10) NOT NULL DEFAULT 0,
`Title` varchar(35) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
`Started` datetime(0) NOT NULL,
`Ended` datetime(0) NOT NULL,
`Type` tinyint(4) NOT NULL DEFAULT 0
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for featured_merch
-- ----------------------------
DROP TABLE IF EXISTS `featured_merch`;
CREATE TABLE `featured_merch` (
`ProductID` int(10) NOT NULL DEFAULT 0,
`Title` varchar(35) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
`Image` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
`Started` datetime(0) NOT NULL,
`Ended` datetime(0) NOT NULL,
`ArtistID` int(10) UNSIGNED DEFAULT 0
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for forums
-- ----------------------------
DROP TABLE IF EXISTS `forums`;
CREATE TABLE `forums` (
`ID` int(6) UNSIGNED NOT NULL AUTO_INCREMENT,
`CategoryID` tinyint(2) NOT NULL DEFAULT 0,
`Sort` int(6) UNSIGNED NOT NULL,
`Name` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
`Description` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '',
`MinClassRead` int(4) NOT NULL DEFAULT 0,
`MinClassWrite` int(4) NOT NULL DEFAULT 0,
`MinClassCreate` int(4) NOT NULL DEFAULT 0,
`NumTopics` int(10) NOT NULL DEFAULT 0,
`NumPosts` int(10) NOT NULL DEFAULT 0,
`LastPostID` int(10) NOT NULL DEFAULT 0,
`LastPostAuthorID` int(10) NOT NULL DEFAULT 0,
`LastPostTopicID` int(10) NOT NULL DEFAULT 0,
`LastPostTime` datetime(0) NOT NULL,
`AutoLock` enum('0','1') CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '1',
`AutoLockWeeks` int(3) UNSIGNED NOT NULL DEFAULT 4,
`Second` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
PRIMARY KEY (`ID`) USING BTREE,
INDEX `Sort`(`Sort`) USING BTREE,
INDEX `MinClassRead`(`MinClassRead`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for forums_categories
-- ----------------------------
DROP TABLE IF EXISTS `forums_categories`;
CREATE TABLE `forums_categories` (
`ID` tinyint(2) NOT NULL AUTO_INCREMENT,
`Name` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
`Sort` int(6) UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`ID`) USING BTREE,
INDEX `Sort`(`Sort`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for forums_last_read_topics
-- ----------------------------
DROP TABLE IF EXISTS `forums_last_read_topics`;
CREATE TABLE `forums_last_read_topics` (
`UserID` int(10) NOT NULL,
`TopicID` int(10) NOT NULL,
`PostID` int(10) NOT NULL,
PRIMARY KEY (`UserID`, `TopicID`) USING BTREE,
INDEX `TopicID`(`TopicID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for forums_polls
-- ----------------------------
DROP TABLE IF EXISTS `forums_polls`;
CREATE TABLE `forums_polls` (
`TopicID` int(10) UNSIGNED NOT NULL,
`Question` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`Answers` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`Featured` datetime(0) NOT NULL,
`Closed` enum('0','1') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0',
`MaxCount` int(11) NOT NULL DEFAULT 1,
PRIMARY KEY (`TopicID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for forums_polls_votes
-- ----------------------------
DROP TABLE IF EXISTS `forums_polls_votes`;
CREATE TABLE `forums_polls_votes` (
`TopicID` int(10) UNSIGNED NOT NULL,
`UserID` int(10) UNSIGNED NOT NULL,
`Vote` tinyint(3) UNSIGNED NOT NULL,
PRIMARY KEY (`TopicID`, `UserID`, `Vote`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for forums_posts
-- ----------------------------
DROP TABLE IF EXISTS `forums_posts`;
CREATE TABLE `forums_posts` (
`ID` int(10) NOT NULL AUTO_INCREMENT,
`TopicID` int(10) NOT NULL,
`AuthorID` int(10) NOT NULL,
`AddedTime` datetime(0) NOT NULL,
`Body` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci,
`EditedUserID` int(10) DEFAULT NULL,
`EditedTime` datetime(0) DEFAULT NULL,
PRIMARY KEY (`ID`) USING BTREE,
INDEX `TopicID`(`TopicID`) USING BTREE,
INDEX `AuthorID`(`AuthorID`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for forums_posts_jf_log
-- ----------------------------
DROP TABLE IF EXISTS `forums_posts_jf_log`;
CREATE TABLE `forums_posts_jf_log` (
`ID` int(10) NOT NULL AUTO_INCREMENT,
`TopicID` int(10) NOT NULL,
`AuthorID` int(10) NOT NULL,
`PostID` int(10) NOT NULL,
`AddedTime` datetime(0) NOT NULL,
`LogTime` datetime(0) NOT NULL,
`Sentuid` int(10) NOT NULL,
`Sentjf` int(10) NOT NULL,
`Comment` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`Sys` int(11) NOT NULL DEFAULT 0,
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for forums_specific_rules
-- ----------------------------
DROP TABLE IF EXISTS `forums_specific_rules`;
CREATE TABLE `forums_specific_rules` (
`ForumID` int(6) UNSIGNED DEFAULT NULL,
`ThreadID` int(10) DEFAULT NULL
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for forums_topic_notes
-- ----------------------------
DROP TABLE IF EXISTS `forums_topic_notes`;
CREATE TABLE `forums_topic_notes` (
`ID` int(10) NOT NULL AUTO_INCREMENT,
`TopicID` int(10) NOT NULL,
`AuthorID` int(10) NOT NULL,
`AddedTime` datetime(0) NOT NULL,
`Body` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci,
PRIMARY KEY (`ID`) USING BTREE,
INDEX `TopicID`(`TopicID`) USING BTREE,
INDEX `AuthorID`(`AuthorID`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for forums_topics
-- ----------------------------
DROP TABLE IF EXISTS `forums_topics`;
CREATE TABLE `forums_topics` (
`ID` int(10) NOT NULL AUTO_INCREMENT,
`Title` varchar(150) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`AuthorID` int(10) NOT NULL,
`IsLocked` enum('0','1') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0',
`IsNotice` enum('0','1') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0',
`IsSticky` enum('0','1') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0',
`ForumID` int(3) NOT NULL,
`NumPosts` int(10) NOT NULL DEFAULT 0,
`LastPostID` int(10) NOT NULL,
`LastPostTime` datetime(0) NOT NULL,
`LastPostAuthorID` int(10) NOT NULL,
`StickyPostID` int(10) NOT NULL DEFAULT 0,
`Ranking` tinyint(2) DEFAULT 0,
`CreatedTime` datetime(0) NOT NULL,
`AutoLocked` enum('0','1','2') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0',
`hiddenreplies` enum('0','1') CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
PRIMARY KEY (`ID`) USING BTREE,
INDEX `AuthorID`(`AuthorID`) USING BTREE,
INDEX `ForumID`(`ForumID`) USING BTREE,
INDEX `IsSticky`(`IsSticky`) USING BTREE,
INDEX `LastPostID`(`LastPostID`) USING BTREE,
INDEX `Title`(`Title`) USING BTREE,
INDEX `CreatedTime`(`CreatedTime`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for freetorrents_timed
-- ----------------------------
DROP TABLE IF EXISTS `freetorrents_timed`;
CREATE TABLE `freetorrents_timed` (
`TorrentID` int(11) NOT NULL,
`EndTime` datetime(0) NOT NULL,
PRIMARY KEY (`TorrentID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for friends
-- ----------------------------
DROP TABLE IF EXISTS `friends`;
CREATE TABLE `friends` (
`UserID` int(10) UNSIGNED NOT NULL,
`FriendID` int(10) UNSIGNED NOT NULL,
`Comment` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
PRIMARY KEY (`UserID`, `FriendID`) USING BTREE,
INDEX `UserID`(`UserID`) USING BTREE,
INDEX `FriendID`(`FriendID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for geoip_country
-- ----------------------------
DROP TABLE IF EXISTS `geoip_country`;
CREATE TABLE `geoip_country` (
`StartIP` int(11) UNSIGNED NOT NULL,
`EndIP` int(11) UNSIGNED NOT NULL,
`Code` varchar(2) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
PRIMARY KEY (`StartIP`, `EndIP`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for group_log
-- ----------------------------
DROP TABLE IF EXISTS `group_log`;
CREATE TABLE `group_log` (
`ID` int(10) NOT NULL AUTO_INCREMENT,
`GroupID` int(10) NOT NULL,
`TorrentID` int(10) NOT NULL,
`UserID` int(10) NOT NULL DEFAULT 0,
`Info` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci,
`Time` datetime(0) NOT NULL,
`Hidden` tinyint(4) NOT NULL DEFAULT 0,
PRIMARY KEY (`ID`) USING BTREE,
INDEX `GroupID`(`GroupID`) USING BTREE,
INDEX `TorrentID`(`TorrentID`) USING BTREE,
INDEX `UserID`(`UserID`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 39574 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for invite_tree
-- ----------------------------
DROP TABLE IF EXISTS `invite_tree`;
CREATE TABLE `invite_tree` (
`UserID` int(10) NOT NULL DEFAULT 0,
`InviterID` int(10) NOT NULL DEFAULT 0,
`TreePosition` int(8) NOT NULL DEFAULT 1,
`TreeID` int(10) NOT NULL DEFAULT 1,
`TreeLevel` int(3) NOT NULL DEFAULT 0,
PRIMARY KEY (`UserID`) USING BTREE,
INDEX `InviterID`(`InviterID`) USING BTREE,
INDEX `TreePosition`(`TreePosition`) USING BTREE,
INDEX `TreeID`(`TreeID`) USING BTREE,
INDEX `TreeLevel`(`TreeLevel`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for invites