-
Notifications
You must be signed in to change notification settings - Fork 106
/
db.sql
116 lines (108 loc) · 4.76 KB
/
db.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
CREATE TABLE IF NOT EXISTS `files` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`game_id` int(10) unsigned DEFAULT 0,
`name` varchar(255) NOT NULL DEFAULT '0',
`type` enum('GAME','GOODIES','PATCHES') NOT NULL,
`size` bigint(20) unsigned DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `type` (`type`),
KEY `name` (`name`),
KEY `game_id` (`game_id`),
KEY `size` (`size`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `games` (
`id` int(11) unsigned NOT NULL,
`title` varchar(255) NOT NULL,
`indev` tinyint(1) unsigned NOT NULL DEFAULT 0,
`new` tinyint(1) unsigned NOT NULL DEFAULT 0,
`updated` tinyint(1) unsigned NOT NULL DEFAULT 0,
`last_upload` int(11) unsigned NOT NULL DEFAULT 0,
`last_update` int(11) unsigned NOT NULL DEFAULT 0,
`has_background` tinyint(1) unsigned NOT NULL DEFAULT 0,
`has_thumbnail` tinyint(1) unsigned NOT NULL DEFAULT 0,
`slug` varchar(255) NOT NULL,
`slug_folder` varchar(255) DEFAULT NULL,
`url` varchar(2083) DEFAULT NULL,
`release_date` int(11) unsigned DEFAULT NULL,
`developer` varchar(255) DEFAULT NULL,
`publisher` varchar(255) DEFAULT NULL,
`category` varchar(255) DEFAULT NULL,
`hidden` tinyint(1) unsigned NOT NULL DEFAULT 0,
`uploading` tinyint(1) unsigned NOT NULL DEFAULT 0,
`queued` tinyint(1) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE KEY `unq_slug` (`slug`),
UNIQUE KEY `unq_slug_folder` (`slug_folder`),
KEY `cat` (`category`),
KEY `pub` (`publisher`),
KEY `dev` (`developer`),
KEY `slug` (`slug`),
KEY `rlsdate` (`release_date`),
KEY `hidden` (`hidden`),
KEY `indev` (`indev`),
KEY `new` (`new`),
KEY `updated` (`updated`),
KEY `title` (`title`),
KEY `last_upload` (`last_upload`),
KEY `date_added` (`last_update`),
KEY `slug_folder` (`slug_folder`),
KEY `uploading` (`uploading`),
KEY `queued` (`queued`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `hosters` (
`id` varchar(50) NOT NULL,
`name` varchar(50) NOT NULL,
`order` int(2) unsigned NOT NULL,
`icon_html` text DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `order` (`order`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `hosters` (`id`, `name`, `order`, `icon_html`) VALUES
('1fichier', '1fichier', 14, '<img src="/static/img/hoster_logos/1fichier.svg" class="fac-hoster">'),
('filecloud', 'filecloud.io', 8, '<i class="fas fa-fw fa-