forked from TheGamesDB/TheGamesDB
-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.sql
286 lines (257 loc) · 9.99 KB
/
schema.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
-- MySQL dump 10.13 Distrib 5.1.37, for debian-linux-gnu (i486)
--
-- Host: localhost Database: thegamedb
-- ------------------------------------------------------
-- Server version 5.1.37-1ubuntu5.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `apiusers`
--
DROP TABLE IF EXISTS `apiusers`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `apiusers` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`apikey` varchar(16) DEFAULT NULL,
`projectname` varchar(255) NOT NULL,
`projectwebsite` varchar(255) DEFAULT NULL,
`userid` int(10) unsigned NOT NULL,
`lastupdated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `banners`
--
DROP TABLE IF EXISTS `banners`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `banners` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`keytype` varchar(16) NOT NULL,
`keyvalue` int(10) unsigned NOT NULL,
`userid` int(10) unsigned NOT NULL DEFAULT '1',
`subkey` varchar(16) DEFAULT NULL,
`filename` varchar(255) NOT NULL,
`username` varchar(45) DEFAULT NULL,
`dateadded` int(10) unsigned DEFAULT NULL,
`languageid` int(10) NOT NULL DEFAULT '7',
`resolution` varchar(9) DEFAULT NULL,
`colors` varchar(255) DEFAULT NULL,
`artistcolors` varchar(255) DEFAULT NULL,
`mirrorupdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `FK_banners_1` (`userid`),
KEY `Index_3` (`keyvalue`),
KEY `mirrorupdate` (`mirrorupdate`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `deletions`
--
DROP TABLE IF EXISTS `deletions`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `deletions` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`path` varchar(255) CHARACTER SET latin1 NOT NULL DEFAULT 'junkinfo',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `games`
--
DROP TABLE IF EXISTS `games`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `games` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`GameTitle` varchar(255) NOT NULL,
`GameID` varchar(45) DEFAULT NULL,
`Status` varchar(100) DEFAULT NULL,
`ReleaseDate` varchar(100) DEFAULT NULL,
`Developer` varchar(100) DEFAULT NULL,
`Publisher` varchar(100) DEFAULT NULL,
`Runtime` varchar(100) DEFAULT NULL,
`Genre` varchar(100) DEFAULT NULL,
`Actors` text,
`Overview` text,
`bannerrequest` int(10) unsigned DEFAULT '0',
`lastupdated` int(10) unsigned DEFAULT NULL,
`Rating` varchar(45) DEFAULT NULL,
`flagged` int(10) unsigned DEFAULT '0',
`forceupdate` int(10) unsigned DEFAULT '0',
`hits` int(10) unsigned DEFAULT '0',
`updateID` int(10) NOT NULL DEFAULT '0',
`requestcomment` varchar(255) NOT NULL DEFAULT '',
`locked` varchar(3) NOT NULL DEFAULT 'no',
`mirrorupdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`lockedby` int(11) NOT NULL,
`autoimport` varchar(16) DEFAULT NULL,
`disabled` varchar(3) NOT NULL DEFAULT 'No',
`IMDB_ID` varchar(25) DEFAULT NULL,
`zap2it_id` varchar(12) DEFAULT NULL,
`Platform` varchar(100) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `disabled` (`disabled`),
FULLTEXT (GameTitle)
) ENGINE=MyISAM
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `genres`
--
DROP TABLE IF EXISTS `genres`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `genres` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`genre` varchar(100) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `imgstatus`
--
DROP TABLE IF EXISTS `imgstatus`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `imgstatus` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`description` varchar(50) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `languages`
--
DROP TABLE IF EXISTS `languages`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `languages` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`abbreviation` varchar(10) NOT NULL,
`name` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`enabled` tinyint(1) NOT NULL DEFAULT '0',
`mirrorupdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `mirrorupdate` (`mirrorupdate`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `mirrors`
--
DROP TABLE IF EXISTS `mirrors`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `mirrors` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`mirrorpath` varchar(255) NOT NULL,
`contactemail` varchar(255) DEFAULT NULL,
`projectname` varchar(255) DEFAULT NULL,
`lastupdated` timestamp NOT NULL DEFAULT '2007-01-01 07:00:00',
`mirrorpass` varchar(45) NOT NULL,
`typemask` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `platforms`
--
DROP TABLE IF EXISTS `platforms`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `platforms` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(100) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `ratings`
--
DROP TABLE IF EXISTS `ratings`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ratings` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`itemtype` varchar(16) CHARACTER SET latin1 NOT NULL,
`itemid` bigint(20) unsigned NOT NULL,
`userid` bigint(20) unsigned NOT NULL,
`rating` tinyint(3) unsigned NOT NULL,
PRIMARY KEY (`id`),
KEY `itemid` (`itemid`,`userid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `runtimes`
--
DROP TABLE IF EXISTS `runtimes`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `runtimes` (
`Runtime` int(11) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`Runtime`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `translation_seriesoverview`
--
DROP TABLE IF EXISTS `translation_seriesoverview`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `translation_seriesoverview` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`seriesid` int(10) unsigned NOT NULL,
`languageid` int(10) unsigned NOT NULL,
`translation` text,
`mirrorupdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `SeriesId` (`seriesid`,`languageid`),
KEY `mirrorupdate` (`mirrorupdate`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `users`
--
DROP TABLE IF EXISTS `users`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `users` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`username` varchar(45) NOT NULL,
`userpass` varchar(255) NOT NULL,
`emailaddress` varchar(45) DEFAULT NULL,
`ipaddress` varchar(45) DEFAULT NULL,
`userlevel` varchar(45) DEFAULT 'USER',
`languageid` int(10) unsigned NOT NULL DEFAULT '7',
`favorites` text,
`favorites_displaymode` varchar(8) NOT NULL DEFAULT 'banners',
`bannerlimit` int(11) DEFAULT '3',
`banneragreement` tinyint(1) NOT NULL DEFAULT '0',
`active` tinyint(1) NOT NULL DEFAULT '1',
`uniqueid` varchar(16) DEFAULT NULL,
`lastupdatedby_admin` int(10) unsigned DEFAULT NULL,
`mirrorupdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `uniqueid` (`uniqueid`),
KEY `mirrorupdate` (`mirrorupdate`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2010-04-17 13:39:39