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