1 -- This is a copy of MediaWiki 1.16 schema shared by MySQL and SQLite.
2 -- It is used for updater testing. Comments are stripped to decrease
3 -- file size, as we don't need to maintain it.
5 CREATE TABLE /*_*/user (
6 user_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT,
7 user_name varchar(255) binary NOT NULL default '',
8 user_real_name varchar(255) binary NOT NULL default '',
9 user_password tinyblob NOT NULL,
10 user_newpassword tinyblob NOT NULL,
11 user_newpass_time binary(14),
12 user_email tinytext NOT NULL,
13 user_options blob NOT NULL,
14 user_touched binary(14) NOT NULL default '',
15 user_token binary(32) NOT NULL default '',
16 user_email_authenticated binary(14),
17 user_email_token binary(32),
18 user_email_token_expires binary(14),
19 user_registration binary(14),
21 ) /*$wgDBTableOptions*/;
22 CREATE UNIQUE INDEX /*i*/user_name ON /*_*/user (user_name);
23 CREATE INDEX /*i*/user_email_token ON /*_*/user (user_email_token);
24 CREATE TABLE /*_*/user_groups (
25 ug_user int unsigned NOT NULL default 0,
26 ug_group varbinary(16) NOT NULL default ''
27 ) /*$wgDBTableOptions*/;
28 CREATE UNIQUE INDEX /*i*/ug_user_group ON /*_*/user_groups (ug_user,ug_group);
29 CREATE INDEX /*i*/ug_group ON /*_*/user_groups (ug_group);
30 CREATE TABLE /*_*/user_newtalk (
31 user_id int NOT NULL default 0,
32 user_ip varbinary(40) NOT NULL default '',
33 user_last_timestamp binary(14) NOT NULL default ''
34 ) /*$wgDBTableOptions*/;
35 CREATE INDEX /*i*/un_user_id ON /*_*/user_newtalk (user_id);
36 CREATE INDEX /*i*/un_user_ip ON /*_*/user_newtalk (user_ip);
37 CREATE TABLE /*_*/user_properties (
39 up_property varbinary(32) NOT NULL,
41 ) /*$wgDBTableOptions*/;
42 CREATE UNIQUE INDEX /*i*/user_properties_user_property ON /*_*/user_properties (up_user,up_property);
43 CREATE INDEX /*i*/user_properties_property ON /*_*/user_properties (up_property);
44 CREATE TABLE /*_*/page (
45 page_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT,
46 page_namespace int NOT NULL,
47 page_title varchar(255) binary NOT NULL,
48 page_restrictions tinyblob NOT NULL,
49 page_counter bigint unsigned NOT NULL default 0,
50 page_is_redirect tinyint unsigned NOT NULL default 0,
51 page_is_new tinyint unsigned NOT NULL default 0,
52 page_random real unsigned NOT NULL,
53 page_touched binary(14) NOT NULL default '',
54 page_latest int unsigned NOT NULL,
55 page_len int unsigned NOT NULL
56 ) /*$wgDBTableOptions*/;
57 CREATE UNIQUE INDEX /*i*/name_title ON /*_*/page (page_namespace,page_title);
58 CREATE INDEX /*i*/page_random ON /*_*/page (page_random);
59 CREATE INDEX /*i*/page_len ON /*_*/page (page_len);
60 CREATE TABLE /*_*/revision (
61 rev_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT,
62 rev_page int unsigned NOT NULL,
63 rev_text_id int unsigned NOT NULL,
64 rev_comment tinyblob NOT NULL,
65 rev_user int unsigned NOT NULL default 0,
66 rev_user_text varchar(255) binary NOT NULL default '',
67 rev_timestamp binary(14) NOT NULL default '',
68 rev_minor_edit tinyint unsigned NOT NULL default 0,
69 rev_deleted tinyint unsigned NOT NULL default 0,
71 rev_parent_id int unsigned default NULL
72 ) /*$wgDBTableOptions*/ MAX_ROWS=10000000 AVG_ROW_LENGTH=1024;
73 CREATE UNIQUE INDEX /*i*/rev_page_id ON /*_*/revision (rev_page, rev_id);
74 CREATE INDEX /*i*/rev_timestamp ON /*_*/revision (rev_timestamp);
75 CREATE INDEX /*i*/page_timestamp ON /*_*/revision (rev_page,rev_timestamp);
76 CREATE INDEX /*i*/user_timestamp ON /*_*/revision (rev_user,rev_timestamp);
77 CREATE INDEX /*i*/usertext_timestamp ON /*_*/revision (rev_user_text,rev_timestamp);
78 CREATE TABLE /*_*/text (
79 old_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT,
80 old_text mediumblob NOT NULL,
81 old_flags tinyblob NOT NULL
82 ) /*$wgDBTableOptions*/ MAX_ROWS=10000000 AVG_ROW_LENGTH=10240;
83 CREATE TABLE /*_*/archive (
84 ar_namespace int NOT NULL default 0,
85 ar_title varchar(255) binary NOT NULL default '',
86 ar_text mediumblob NOT NULL,
87 ar_comment tinyblob NOT NULL,
88 ar_user int unsigned NOT NULL default 0,
89 ar_user_text varchar(255) binary NOT NULL,
90 ar_timestamp binary(14) NOT NULL default '',
91 ar_minor_edit tinyint NOT NULL default 0,
92 ar_flags tinyblob NOT NULL,
93 ar_rev_id int unsigned,
94 ar_text_id int unsigned,
95 ar_deleted tinyint unsigned NOT NULL default 0,
97 ar_page_id int unsigned,
98 ar_parent_id int unsigned default NULL
99 ) /*$wgDBTableOptions*/;
100 CREATE INDEX /*i*/name_title_timestamp ON /*_*/archive (ar_namespace,ar_title,ar_timestamp);
101 CREATE INDEX /*i*/ar_usertext_timestamp ON /*_*/archive (ar_user_text,ar_timestamp);
102 CREATE TABLE /*_*/pagelinks (
103 pl_from int unsigned NOT NULL default 0,
104 pl_namespace int NOT NULL default 0,
105 pl_title varchar(255) binary NOT NULL default ''
106 ) /*$wgDBTableOptions*/;
107 CREATE UNIQUE INDEX /*i*/pl_from ON /*_*/pagelinks (pl_from,pl_namespace,pl_title);
108 CREATE UNIQUE INDEX /*i*/pl_namespace ON /*_*/pagelinks (pl_namespace,pl_title,pl_from);
109 CREATE TABLE /*_*/templatelinks (
110 tl_from int unsigned NOT NULL default 0,
111 tl_namespace int NOT NULL default 0,
112 tl_title varchar(255) binary NOT NULL default ''
113 ) /*$wgDBTableOptions*/;
114 CREATE UNIQUE INDEX /*i*/tl_from ON /*_*/templatelinks (tl_from,tl_namespace,tl_title);
115 CREATE UNIQUE INDEX /*i*/tl_namespace ON /*_*/templatelinks (tl_namespace,tl_title,tl_from);
116 CREATE TABLE /*_*/imagelinks (
117 il_from int unsigned NOT NULL default 0,
118 il_to varchar(255) binary NOT NULL default ''
119 ) /*$wgDBTableOptions*/;
120 CREATE UNIQUE INDEX /*i*/il_from ON /*_*/imagelinks (il_from,il_to);
121 CREATE UNIQUE INDEX /*i*/il_to ON /*_*/imagelinks (il_to,il_from);
122 CREATE TABLE /*_*/categorylinks (
123 cl_from int unsigned NOT NULL default 0,
124 cl_to varchar(255) binary NOT NULL default '',
125 cl_sortkey varchar(70) binary NOT NULL default '',
126 cl_timestamp timestamp NOT NULL
127 ) /*$wgDBTableOptions*/;
128 CREATE UNIQUE INDEX /*i*/cl_from ON /*_*/categorylinks (cl_from,cl_to);
129 CREATE INDEX /*i*/cl_sortkey ON /*_*/categorylinks (cl_to,cl_sortkey,cl_from);
130 CREATE INDEX /*i*/cl_timestamp ON /*_*/categorylinks (cl_to,cl_timestamp);
131 CREATE TABLE /*_*/category (
132 cat_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT,
133 cat_title varchar(255) binary NOT NULL,
134 cat_pages int signed NOT NULL default 0,
135 cat_subcats int signed NOT NULL default 0,
136 cat_files int signed NOT NULL default 0,
137 cat_hidden tinyint unsigned NOT NULL default 0
138 ) /*$wgDBTableOptions*/;
139 CREATE UNIQUE INDEX /*i*/cat_title ON /*_*/category (cat_title);
140 CREATE INDEX /*i*/cat_pages ON /*_*/category (cat_pages);
141 CREATE TABLE /*_*/externallinks (
142 el_from int unsigned NOT NULL default 0,
144 el_index blob NOT NULL
145 ) /*$wgDBTableOptions*/;
146 CREATE INDEX /*i*/el_from ON /*_*/externallinks (el_from, el_to(40));
147 CREATE INDEX /*i*/el_to ON /*_*/externallinks (el_to(60), el_from);
148 CREATE INDEX /*i*/el_index ON /*_*/externallinks (el_index(60));
149 CREATE TABLE /*_*/langlinks (
150 ll_from int unsigned NOT NULL default 0,
151 ll_lang varbinary(20) NOT NULL default '',
152 ll_title varchar(255) binary NOT NULL default ''
153 ) /*$wgDBTableOptions*/;
154 CREATE UNIQUE INDEX /*i*/ll_from ON /*_*/langlinks (ll_from, ll_lang);
155 CREATE INDEX /*i*/ll_lang ON /*_*/langlinks (ll_lang, ll_title);
156 CREATE TABLE /*_*/site_stats (
157 ss_row_id int unsigned NOT NULL,
158 ss_total_views bigint unsigned default 0,
159 ss_total_edits bigint unsigned default 0,
160 ss_good_articles bigint unsigned default 0,
161 ss_total_pages bigint default '-1',
162 ss_users bigint default '-1',
163 ss_active_users bigint default '-1',
164 ss_admins int default '-1',
165 ss_images int default 0
166 ) /*$wgDBTableOptions*/;
167 CREATE UNIQUE INDEX /*i*/ss_row_id ON /*_*/site_stats (ss_row_id);
168 CREATE TABLE /*_*/hitcounter (
169 hc_id int unsigned NOT NULL
170 ) ENGINE=HEAP MAX_ROWS=25000;
171 CREATE TABLE /*_*/ipblocks (
172 ipb_id int NOT NULL PRIMARY KEY AUTO_INCREMENT,
173 ipb_address tinyblob NOT NULL,
174 ipb_user int unsigned NOT NULL default 0,
175 ipb_by int unsigned NOT NULL default 0,
176 ipb_by_text varchar(255) binary NOT NULL default '',
177 ipb_reason tinyblob NOT NULL,
178 ipb_timestamp binary(14) NOT NULL default '',
179 ipb_auto bool NOT NULL default 0,
180 ipb_anon_only bool NOT NULL default 0,
181 ipb_create_account bool NOT NULL default 1,
182 ipb_enable_autoblock bool NOT NULL default '1',
183 ipb_expiry varbinary(14) NOT NULL default '',
184 ipb_range_start tinyblob NOT NULL,
185 ipb_range_end tinyblob NOT NULL,
186 ipb_deleted bool NOT NULL default 0,
187 ipb_block_email bool NOT NULL default 0,
188 ipb_allow_usertalk bool NOT NULL default 0
189 ) /*$wgDBTableOptions*/;
190 CREATE UNIQUE INDEX /*i*/ipb_address ON /*_*/ipblocks (ipb_address(255), ipb_user, ipb_auto, ipb_anon_only);
191 CREATE INDEX /*i*/ipb_user ON /*_*/ipblocks (ipb_user);
192 CREATE INDEX /*i*/ipb_range ON /*_*/ipblocks (ipb_range_start(8), ipb_range_end(8));
193 CREATE INDEX /*i*/ipb_timestamp ON /*_*/ipblocks (ipb_timestamp);
194 CREATE INDEX /*i*/ipb_expiry ON /*_*/ipblocks (ipb_expiry);
195 CREATE TABLE /*_*/image (
196 img_name varchar(255) binary NOT NULL default '' PRIMARY KEY,
197 img_size int unsigned NOT NULL default 0,
198 img_width int NOT NULL default 0,
199 img_height int NOT NULL default 0,
200 img_metadata mediumblob NOT NULL,
201 img_bits int NOT NULL default 0,
202 img_media_type ENUM("UNKNOWN", "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE") default NULL,
203 img_major_mime ENUM("unknown", "application", "audio", "image", "text", "video", "message", "model", "multipart") NOT NULL default "unknown",
204 img_minor_mime varbinary(100) NOT NULL default "unknown",
205 img_description tinyblob NOT NULL,
206 img_user int unsigned NOT NULL default 0,
207 img_user_text varchar(255) binary NOT NULL,
208 img_timestamp varbinary(14) NOT NULL default '',
209 img_sha1 varbinary(32) NOT NULL default ''
210 ) /*$wgDBTableOptions*/;
211 CREATE INDEX /*i*/img_usertext_timestamp ON /*_*/image (img_user_text,img_timestamp);
212 CREATE INDEX /*i*/img_size ON /*_*/image (img_size);
213 CREATE INDEX /*i*/img_timestamp ON /*_*/image (img_timestamp);
214 CREATE INDEX /*i*/img_sha1 ON /*_*/image (img_sha1);
215 CREATE TABLE /*_*/oldimage (
216 oi_name varchar(255) binary NOT NULL default '',
217 oi_archive_name varchar(255) binary NOT NULL default '',
218 oi_size int unsigned NOT NULL default 0,
219 oi_width int NOT NULL default 0,
220 oi_height int NOT NULL default 0,
221 oi_bits int NOT NULL default 0,
222 oi_description tinyblob NOT NULL,
223 oi_user int unsigned NOT NULL default 0,
224 oi_user_text varchar(255) binary NOT NULL,
225 oi_timestamp binary(14) NOT NULL default '',
226 oi_metadata mediumblob NOT NULL,
227 oi_media_type ENUM("UNKNOWN", "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE") default NULL,
228 oi_major_mime ENUM("unknown", "application", "audio", "image", "text", "video", "message", "model", "multipart") NOT NULL default "unknown",
229 oi_minor_mime varbinary(100) NOT NULL default "unknown",
230 oi_deleted tinyint unsigned NOT NULL default 0,
231 oi_sha1 varbinary(32) NOT NULL default ''
232 ) /*$wgDBTableOptions*/;
233 CREATE INDEX /*i*/oi_usertext_timestamp ON /*_*/oldimage (oi_user_text,oi_timestamp);
234 CREATE INDEX /*i*/oi_name_timestamp ON /*_*/oldimage (oi_name,oi_timestamp);
235 CREATE INDEX /*i*/oi_name_archive_name ON /*_*/oldimage (oi_name,oi_archive_name(14));
236 CREATE INDEX /*i*/oi_sha1 ON /*_*/oldimage (oi_sha1);
237 CREATE TABLE /*_*/filearchive (
238 fa_id int NOT NULL PRIMARY KEY AUTO_INCREMENT,
239 fa_name varchar(255) binary NOT NULL default '',
240 fa_archive_name varchar(255) binary default '',
241 fa_storage_group varbinary(16),
242 fa_storage_key varbinary(64) default '',
244 fa_deleted_timestamp binary(14) default '',
245 fa_deleted_reason text,
246 fa_size int unsigned default 0,
247 fa_width int default 0,
248 fa_height int default 0,
249 fa_metadata mediumblob,
250 fa_bits int default 0,
251 fa_media_type ENUM("UNKNOWN", "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE") default NULL,
252 fa_major_mime ENUM("unknown", "application", "audio", "image", "text", "video", "message", "model", "multipart") default "unknown",
253 fa_minor_mime varbinary(100) default "unknown",
254 fa_description tinyblob,
255 fa_user int unsigned default 0,
256 fa_user_text varchar(255) binary,
257 fa_timestamp binary(14) default '',
258 fa_deleted tinyint unsigned NOT NULL default 0
259 ) /*$wgDBTableOptions*/;
260 CREATE INDEX /*i*/fa_name ON /*_*/filearchive (fa_name, fa_timestamp);
261 CREATE INDEX /*i*/fa_storage_group ON /*_*/filearchive (fa_storage_group, fa_storage_key);
262 CREATE INDEX /*i*/fa_deleted_timestamp ON /*_*/filearchive (fa_deleted_timestamp);
263 CREATE INDEX /*i*/fa_user_timestamp ON /*_*/filearchive (fa_user_text,fa_timestamp);
264 CREATE TABLE /*_*/recentchanges (
265 rc_id int NOT NULL PRIMARY KEY AUTO_INCREMENT,
266 rc_timestamp varbinary(14) NOT NULL default '',
267 rc_cur_time varbinary(14) NOT NULL default '',
268 rc_user int unsigned NOT NULL default 0,
269 rc_user_text varchar(255) binary NOT NULL,
270 rc_namespace int NOT NULL default 0,
271 rc_title varchar(255) binary NOT NULL default '',
272 rc_comment varchar(255) binary NOT NULL default '',
273 rc_minor tinyint unsigned NOT NULL default 0,
274 rc_bot tinyint unsigned NOT NULL default 0,
275 rc_new tinyint unsigned NOT NULL default 0,
276 rc_cur_id int unsigned NOT NULL default 0,
277 rc_this_oldid int unsigned NOT NULL default 0,
278 rc_last_oldid int unsigned NOT NULL default 0,
279 rc_type tinyint unsigned NOT NULL default 0,
280 rc_moved_to_ns tinyint unsigned NOT NULL default 0,
281 rc_moved_to_title varchar(255) binary NOT NULL default '',
282 rc_patrolled tinyint unsigned NOT NULL default 0,
283 rc_ip varbinary(40) NOT NULL default '',
286 rc_deleted tinyint unsigned NOT NULL default 0,
287 rc_logid int unsigned NOT NULL default 0,
288 rc_log_type varbinary(255) NULL default NULL,
289 rc_log_action varbinary(255) NULL default NULL,
291 ) /*$wgDBTableOptions*/;
292 CREATE INDEX /*i*/rc_timestamp ON /*_*/recentchanges (rc_timestamp);
293 CREATE INDEX /*i*/rc_namespace_title ON /*_*/recentchanges (rc_namespace, rc_title);
294 CREATE INDEX /*i*/rc_cur_id ON /*_*/recentchanges (rc_cur_id);
295 CREATE INDEX /*i*/new_name_timestamp ON /*_*/recentchanges (rc_new,rc_namespace,rc_timestamp);
296 CREATE INDEX /*i*/rc_ip ON /*_*/recentchanges (rc_ip);
297 CREATE INDEX /*i*/rc_ns_usertext ON /*_*/recentchanges (rc_namespace, rc_user_text);
298 CREATE INDEX /*i*/rc_user_text ON /*_*/recentchanges (rc_user_text, rc_timestamp);
299 CREATE TABLE /*_*/watchlist (
300 wl_user int unsigned NOT NULL,
301 wl_namespace int NOT NULL default 0,
302 wl_title varchar(255) binary NOT NULL default '',
303 wl_notificationtimestamp varbinary(14)
304 ) /*$wgDBTableOptions*/;
305 CREATE UNIQUE INDEX /*i*/wl_user ON /*_*/watchlist (wl_user, wl_namespace, wl_title);
306 CREATE INDEX /*i*/namespace_title ON /*_*/watchlist (wl_namespace, wl_title);
307 CREATE TABLE /*_*/math (
308 math_inputhash varbinary(16) NOT NULL,
309 math_outputhash varbinary(16) NOT NULL,
310 math_html_conservativeness tinyint NOT NULL,
313 ) /*$wgDBTableOptions*/;
314 CREATE UNIQUE INDEX /*i*/math_inputhash ON /*_*/math (math_inputhash);
315 CREATE TABLE /*_*/searchindex (
316 si_page int unsigned NOT NULL,
317 si_title varchar(255) NOT NULL default '',
318 si_text mediumtext NOT NULL
320 CREATE UNIQUE INDEX /*i*/si_page ON /*_*/searchindex (si_page);
321 CREATE FULLTEXT INDEX /*i*/si_title ON /*_*/searchindex (si_title);
322 CREATE FULLTEXT INDEX /*i*/si_text ON /*_*/searchindex (si_text);
323 CREATE TABLE /*_*/interwiki (
324 iw_prefix varchar(32) NOT NULL,
325 iw_url blob NOT NULL,
326 iw_local bool NOT NULL,
327 iw_trans tinyint NOT NULL default 0
328 ) /*$wgDBTableOptions*/;
329 CREATE UNIQUE INDEX /*i*/iw_prefix ON /*_*/interwiki (iw_prefix);
330 CREATE TABLE /*_*/querycache (
331 qc_type varbinary(32) NOT NULL,
332 qc_value int unsigned NOT NULL default 0,
333 qc_namespace int NOT NULL default 0,
334 qc_title varchar(255) binary NOT NULL default ''
335 ) /*$wgDBTableOptions*/;
336 CREATE INDEX /*i*/qc_type ON /*_*/querycache (qc_type,qc_value);
337 CREATE TABLE /*_*/objectcache (
338 keyname varbinary(255) NOT NULL default '' PRIMARY KEY,
341 ) /*$wgDBTableOptions*/;
342 CREATE INDEX /*i*/exptime ON /*_*/objectcache (exptime);
343 CREATE TABLE /*_*/transcache (
344 tc_url varbinary(255) NOT NULL,
346 tc_time binary(14) NOT NULL
347 ) /*$wgDBTableOptions*/;
348 CREATE UNIQUE INDEX /*i*/tc_url_idx ON /*_*/transcache (tc_url);
349 CREATE TABLE /*_*/logging (
350 log_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT,
351 log_type varbinary(32) NOT NULL default '',
352 log_action varbinary(32) NOT NULL default '',
353 log_timestamp binary(14) NOT NULL default '19700101000000',
354 log_user int unsigned NOT NULL default 0,
355 log_user_text varchar(255) binary NOT NULL default '',
356 log_namespace int NOT NULL default 0,
357 log_title varchar(255) binary NOT NULL default '',
358 log_page int unsigned NULL,
359 log_comment varchar(255) NOT NULL default '',
360 log_params blob NOT NULL,
361 log_deleted tinyint unsigned NOT NULL default 0
362 ) /*$wgDBTableOptions*/;
363 CREATE INDEX /*i*/type_time ON /*_*/logging (log_type, log_timestamp);
364 CREATE INDEX /*i*/user_time ON /*_*/logging (log_user, log_timestamp);
365 CREATE INDEX /*i*/page_time ON /*_*/logging (log_namespace, log_title, log_timestamp);
366 CREATE INDEX /*i*/times ON /*_*/logging (log_timestamp);
367 CREATE INDEX /*i*/log_user_type_time ON /*_*/logging (log_user, log_type, log_timestamp);
368 CREATE INDEX /*i*/log_page_id_time ON /*_*/logging (log_page,log_timestamp);
369 CREATE TABLE /*_*/log_search (
370 ls_field varbinary(32) NOT NULL,
371 ls_value varchar(255) NOT NULL,
372 ls_log_id int unsigned NOT NULL default 0
373 ) /*$wgDBTableOptions*/;
374 CREATE UNIQUE INDEX /*i*/ls_field_val ON /*_*/log_search (ls_field,ls_value,ls_log_id);
375 CREATE INDEX /*i*/ls_log_id ON /*_*/log_search (ls_log_id);
376 CREATE TABLE /*_*/trackbacks (
377 tb_id int PRIMARY KEY AUTO_INCREMENT,
378 tb_page int REFERENCES /*_*/page(page_id) ON DELETE CASCADE,
379 tb_title varchar(255) NOT NULL,
380 tb_url blob NOT NULL,
383 ) /*$wgDBTableOptions*/;
384 CREATE INDEX /*i*/tb_page ON /*_*/trackbacks (tb_page);
385 CREATE TABLE /*_*/job (
386 job_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT,
387 job_cmd varbinary(60) NOT NULL default '',
388 job_namespace int NOT NULL,
389 job_title varchar(255) binary NOT NULL,
390 job_params blob NOT NULL
391 ) /*$wgDBTableOptions*/;
392 CREATE INDEX /*i*/job_cmd ON /*_*/job (job_cmd, job_namespace, job_title, job_params(128));
393 CREATE TABLE /*_*/querycache_info (
394 qci_type varbinary(32) NOT NULL default '',
395 qci_timestamp binary(14) NOT NULL default '19700101000000'
396 ) /*$wgDBTableOptions*/;
397 CREATE UNIQUE INDEX /*i*/qci_type ON /*_*/querycache_info (qci_type);
398 CREATE TABLE /*_*/redirect (
399 rd_from int unsigned NOT NULL default 0 PRIMARY KEY,
400 rd_namespace int NOT NULL default 0,
401 rd_title varchar(255) binary NOT NULL default '',
402 rd_interwiki varchar(32) default NULL,
403 rd_fragment varchar(255) binary default NULL
404 ) /*$wgDBTableOptions*/;
405 CREATE INDEX /*i*/rd_ns_title ON /*_*/redirect (rd_namespace,rd_title,rd_from);
406 CREATE TABLE /*_*/querycachetwo (
407 qcc_type varbinary(32) NOT NULL,
408 qcc_value int unsigned NOT NULL default 0,
409 qcc_namespace int NOT NULL default 0,
410 qcc_title varchar(255) binary NOT NULL default '',
411 qcc_namespacetwo int NOT NULL default 0,
412 qcc_titletwo varchar(255) binary NOT NULL default ''
413 ) /*$wgDBTableOptions*/;
414 CREATE INDEX /*i*/qcc_type ON /*_*/querycachetwo (qcc_type,qcc_value);
415 CREATE INDEX /*i*/qcc_title ON /*_*/querycachetwo (qcc_type,qcc_namespace,qcc_title);
416 CREATE INDEX /*i*/qcc_titletwo ON /*_*/querycachetwo (qcc_type,qcc_namespacetwo,qcc_titletwo);
417 CREATE TABLE /*_*/page_restrictions (
418 pr_page int NOT NULL,
419 pr_type varbinary(60) NOT NULL,
420 pr_level varbinary(60) NOT NULL,
421 pr_cascade tinyint NOT NULL,
423 pr_expiry varbinary(14) NULL,
424 pr_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT
425 ) /*$wgDBTableOptions*/;
426 CREATE UNIQUE INDEX /*i*/pr_pagetype ON /*_*/page_restrictions (pr_page,pr_type);
427 CREATE INDEX /*i*/pr_typelevel ON /*_*/page_restrictions (pr_type,pr_level);
428 CREATE INDEX /*i*/pr_level ON /*_*/page_restrictions (pr_level);
429 CREATE INDEX /*i*/pr_cascade ON /*_*/page_restrictions (pr_cascade);
430 CREATE TABLE /*_*/protected_titles (
431 pt_namespace int NOT NULL,
432 pt_title varchar(255) binary NOT NULL,
433 pt_user int unsigned NOT NULL,
435 pt_timestamp binary(14) NOT NULL,
436 pt_expiry varbinary(14) NOT NULL default '',
437 pt_create_perm varbinary(60) NOT NULL
438 ) /*$wgDBTableOptions*/;
439 CREATE UNIQUE INDEX /*i*/pt_namespace_title ON /*_*/protected_titles (pt_namespace,pt_title);
440 CREATE INDEX /*i*/pt_timestamp ON /*_*/protected_titles (pt_timestamp);
441 CREATE TABLE /*_*/page_props (
442 pp_page int NOT NULL,
443 pp_propname varbinary(60) NOT NULL,
444 pp_value blob NOT NULL
445 ) /*$wgDBTableOptions*/;
446 CREATE UNIQUE INDEX /*i*/pp_page_propname ON /*_*/page_props (pp_page,pp_propname);
447 CREATE TABLE /*_*/updatelog (
448 ul_key varchar(255) NOT NULL PRIMARY KEY
449 ) /*$wgDBTableOptions*/;
450 CREATE TABLE /*_*/change_tag (
454 ct_tag varchar(255) NOT NULL,
456 ) /*$wgDBTableOptions*/;
457 CREATE UNIQUE INDEX /*i*/change_tag_rc_tag ON /*_*/change_tag (ct_rc_id,ct_tag);
458 CREATE UNIQUE INDEX /*i*/change_tag_log_tag ON /*_*/change_tag (ct_log_id,ct_tag);
459 CREATE UNIQUE INDEX /*i*/change_tag_rev_tag ON /*_*/change_tag (ct_rev_id,ct_tag);
460 CREATE INDEX /*i*/change_tag_tag_id ON /*_*/change_tag (ct_tag,ct_rc_id,ct_rev_id,ct_log_id);
461 CREATE TABLE /*_*/tag_summary (
465 ts_tags blob NOT NULL
466 ) /*$wgDBTableOptions*/;
467 CREATE UNIQUE INDEX /*i*/tag_summary_rc_id ON /*_*/tag_summary (ts_rc_id);
468 CREATE UNIQUE INDEX /*i*/tag_summary_log_id ON /*_*/tag_summary (ts_log_id);
469 CREATE UNIQUE INDEX /*i*/tag_summary_rev_id ON /*_*/tag_summary (ts_rev_id);
470 CREATE TABLE /*_*/valid_tag (
471 vt_tag varchar(255) NOT NULL PRIMARY KEY
472 ) /*$wgDBTableOptions*/;
473 CREATE TABLE /*_*/l10n_cache (
474 lc_lang varbinary(32) NOT NULL,
475 lc_key varchar(255) NOT NULL,
476 lc_value mediumblob NOT NULL
477 ) /*$wgDBTableOptions*/;
478 CREATE INDEX /*i*/lc_lang_key ON /*_*/l10n_cache (lc_lang, lc_key);