aboutsummaryrefslogtreecommitdiff
path: root/weabot.sql
blob: e91a8f20e1dd39f475434cce1283e8de2ed5bea2 (plain) (blame)
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
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `archive` (
  `id` int(10) unsigned NOT NULL,
  `boardid` smallint(5) unsigned NOT NULL,
  `timestamp` int(20) unsigned NOT NULL,
  `subject` varchar(255) CHARACTER SET latin1 NOT NULL,
  `length` smallint(5) unsigned NOT NULL,
  PRIMARY KEY (`id`,`boardid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `bans` (
  `id` mediumint(6) unsigned NOT NULL AUTO_INCREMENT,
  `ip` int(15) unsigned NOT NULL,
  `netmask` int(15) unsigned DEFAULT NULL,
  `boards` text NOT NULL,
  `added` int(10) unsigned NOT NULL,
  `until` int(10) unsigned NOT NULL,
  `staff` varchar(50) NOT NULL,
  `reason` text NOT NULL,
  `note` text NOT NULL,
  `blind` tinyint(1) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `ip` (`ip`)
) ENGINE=MyISAM AUTO_INCREMENT=980 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `boards` (
  `id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
  `dir` varchar(16) NOT NULL,
  `sort` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `name` varchar(64) NOT NULL,
  `longname` varchar(128) NOT NULL,
  `subname` char(3) NOT NULL,
  `postarea_desc` text NOT NULL,
  `postarea_extra` text NOT NULL,
  `force_css` varchar(255) NOT NULL,
  `board_type` tinyint(1) unsigned NOT NULL,
  `anonymous` varchar(128) NOT NULL DEFAULT 'Sin Nombre',
  `subject` varchar(64) NOT NULL DEFAULT 'Sin asunto',
  `message` varchar(128) NOT NULL DEFAULT 'Sin mensaje',
  `disable_name` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `disable_subject` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `useid` tinyint(1) unsigned NOT NULL DEFAULT '1',
  `slip` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `countrycode` tinyint(1) unsigned DEFAULT '0',
  `recyclebin` tinyint(1) unsigned NOT NULL DEFAULT '1',
  `locked` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `secret` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `allow_spoilers` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `allow_oekaki` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `allow_noimage` tinyint(1) unsigned NOT NULL DEFAULT '1',
  `allow_images` tinyint(1) unsigned NOT NULL DEFAULT '1',
  `allow_image_replies` tinyint(1) unsigned NOT NULL DEFAULT '1',
  `maxsize` smallint(5) unsigned NOT NULL DEFAULT '500',
  `thumb_px` smallint(3) unsigned NOT NULL DEFAULT '250',
  `numthreads` tinyint(2) unsigned NOT NULL DEFAULT '10',
  `numcont` tinyint(2) unsigned NOT NULL DEFAULT '10',
  `numline` tinyint(3) unsigned NOT NULL DEFAULT '20',
  `maxage` smallint(3) unsigned NOT NULL DEFAULT '0',
  `maxinactive` smallint(3) unsigned NOT NULL DEFAULT '0',
  `archive` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `threadsecs` smallint(4) unsigned NOT NULL DEFAULT '600',
  `postsecs` tinyint(3) unsigned NOT NULL DEFAULT '30',
  PRIMARY KEY (`id`),
  KEY `dir` (`dir`)
) ENGINE=MyISAM AUTO_INCREMENT=48 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `boards_filetypes` (
  `boardid` smallint(5) unsigned NOT NULL,
  `filetypeid` smallint(5) unsigned NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `filetypes` (
  `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
  `ext` varchar(16) COLLATE utf8_unicode_ci NOT NULL,
  `mime` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `image` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `preserve_name` tinyint(1) NOT NULL,
  `ffmpeg_thumb` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=15 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `filters` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `boards` text NOT NULL,
  `type` tinyint(1) NOT NULL,
  `action` tinyint(1) NOT NULL,
  `from` varchar(255) NOT NULL,
  `from_trip` varchar(30) NOT NULL,
  `to` text NOT NULL,
  `reason` varchar(255) NOT NULL,
  `seconds` int(20) unsigned NOT NULL,
  `blind` tinyint(1) NOT NULL,
  `redirect_url` varchar(40) NOT NULL,
  `redirect_time` tinyint(3) unsigned NOT NULL,
  `staff` varchar(50) NOT NULL,
  `added` int(20) unsigned NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=85 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `last` (
  `id` int(10) unsigned NOT NULL,
  `boardid` smallint(5) unsigned NOT NULL,
  `board_name` varchar(64) NOT NULL,
  `timestamp` int(20) NOT NULL,
  `timestamp_formatted` varchar(50) NOT NULL,
  `content` varchar(200) NOT NULL,
  `url` varchar(64) NOT NULL,
  PRIMARY KEY (`id`,`boardid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `logs` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `timestamp` int(20) unsigned NOT NULL,
  `staff` varchar(75) NOT NULL,
  `action` text NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4138 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `news` (
  `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
  `type` tinyint(1) NOT NULL,
  `staffid` tinyint(3) unsigned NOT NULL,
  `staff_name` varchar(50) NOT NULL,
  `title` varchar(255) NOT NULL,
  `message` text NOT NULL,
  `name` varchar(255) NOT NULL,
  `timestamp_formatted` varchar(255) NOT NULL,
  `timestamp` int(20) unsigned NOT NULL,
  PRIMARY KEY (`type`,`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `posts` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `boardid` smallint(5) unsigned NOT NULL,
  `parentid` mediumint(10) unsigned NOT NULL,
  `timestamp` int(20) unsigned DEFAULT NULL,
  `timestamp_formatted` varchar(50) NOT NULL,
  `name` varchar(255) NOT NULL,
  `tripcode` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `subject` varchar(255) NOT NULL,
  `message` text NOT NULL,
  `password` varchar(255) NOT NULL,
  `file` varchar(75) NOT NULL,
  `file_hex` varchar(75) NOT NULL,
  `file_size` int(20) unsigned NOT NULL,
  `image_width` smallint(5) unsigned NOT NULL,
  `image_height` smallint(5) unsigned NOT NULL,
  `thumb` varchar(255) NOT NULL,
  `thumb_width` smallint(5) unsigned NOT NULL,
  `thumb_height` smallint(5) unsigned NOT NULL,
  `ip` int(15) unsigned NOT NULL,
  `IS_DELETED` tinyint(1) NOT NULL,
  `bumped` int(20) unsigned NOT NULL,
  `last` int(20) unsigned NOT NULL,
  `locked` tinyint(1) NOT NULL,
  `expires` int(20) unsigned NOT NULL,
  `expires_formatted` varchar(30) NOT NULL,
  `expires_alert` tinyint(1) NOT NULL,
  `length` smallint(4) unsigned NOT NULL,
  PRIMARY KEY (`boardid`,`id`),
  KEY `parentid` (`parentid`),
  KEY `bumped` (`bumped`)
) ENGINE=MyISAM AUTO_INCREMENT=1743 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `reports` (
  `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  `board` varchar(16) NOT NULL,
  `postid` int(10) unsigned NOT NULL,
  `parentid` int(10) unsigned NOT NULL,
  `link` varchar(64) NOT NULL,
  `ip` varchar(15) NOT NULL,
  `reason` varchar(255) NOT NULL,
  `reporterip` varchar(15) NOT NULL,
  `timestamp` int(20) unsigned NOT NULL,
  `timestamp_formatted` varchar(50) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=811 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `search` (
  `id` int(10) NOT NULL,
  `boardid` smallint(5) NOT NULL,
  `timestamp` int(20) NOT NULL,
  `subject` varchar(255) CHARACTER SET latin1 NOT NULL,
  `message` text CHARACTER SET latin1 NOT NULL,
  `parentid` int(10) NOT NULL,
  `parenttime` int(20) NOT NULL,
  `parentsub` varchar(255) CHARACTER SET latin1 NOT NULL,
  `num` smallint(5) NOT NULL,
  PRIMARY KEY (`id`,`boardid`),
  FULLTEXT KEY `message` (`message`),
  FULLTEXT KEY `subject` (`subject`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `search_kako` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `boardid` smallint(5) unsigned NOT NULL,
  `pid` int(10) unsigned NOT NULL,
  `subject` varchar(255) CHARACTER SET latin1 NOT NULL,
  `message` text CHARACTER SET latin1 NOT NULL,
  `parentid` int(10) unsigned NOT NULL,
  `num` smallint(5) unsigned NOT NULL,
  `timestamp_formatted` varchar(50) CHARACTER SET latin1 NOT NULL,
  PRIMARY KEY (`id`,`boardid`),
  FULLTEXT KEY `kakoindex` (`message`,`subject`)
) ENGINE=MyISAM AUTO_INCREMENT=115631 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `search_log` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `timestamp` int(20) unsigned NOT NULL,
  `keyword` varchar(255) CHARACTER SET latin1 NOT NULL,
  `ita` varchar(16) CHARACTER SET latin1 NOT NULL,
  `ip` int(20) unsigned NOT NULL,
  `res` smallint(5) unsigned NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3593 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `session` (
  `session_id` varbinary(32) NOT NULL,
  `expires` int(32) NOT NULL,
  `staff_id` tinyint(3) NOT NULL,
  PRIMARY KEY (`session_id`),
  KEY `staff_id` (`staff_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `staff` (
  `id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
  `username` varchar(50) NOT NULL,
  `password` varchar(255) NOT NULL,
  `added` int(10) unsigned NOT NULL,
  `lastactive` int(10) unsigned NOT NULL,
  `rights` tinyint(1) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `username` (`username`,`password`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
INSERT INTO `filetypes` VALUES (1,'jpg','image/jpeg','',0,0),(2,'png','image/png','',0,0),(3,'gif','image/gif','',0,0),(4,'swf','application/x-shockwave-flash','mime/swf.png',1,0),(5,'webm','video/webm','',0,1),(6,'ogg','audio/ogg','',0,1),(7,'opus','audio/opus','',0,1),(8,'mod','audio/mod','mime/mod.png',0,0),(9,'xm','audio/xm','mime/xm.png',0,0),(10,'s3m','audio/s3m','mime/s3m.png',0,0),(11,'mp3','audio/mpeg','',0,1),(12,'torrent','application/x-bittorrent','mime/torrent.png',1,0),(13,'pdf','application/pdf','mime/pdf.png',1,0),(14,'epub','application/epub+zip','mime/epub.png',1,0);