1 -- This is a copy of SQLite schema from MediaWiki 1.13 used for updater testing
3 CREATE TABLE /*$wgDBprefix*/user (
4 user_id INTEGER PRIMARY KEY AUTOINCREMENT,
5 user_name varchar(255) default '',
6 user_real_name varchar(255) default '',
7 user_password tinyblob ,
8 user_newpassword tinyblob ,
9 user_newpass_time BLOB,
12 user_touched BLOB default '',
13 user_token BLOB default '',
14 user_email_authenticated BLOB,
15 user_email_token BLOB,
16 user_email_token_expires BLOB,
17 user_registration BLOB,
18 user_editcount int) /*$wgDBTableOptions*/;
20 CREATE TABLE /*$wgDBprefix*/user_groups (
21 ug_user INTEGER default '0',
22 ug_group varBLOB default '') /*$wgDBTableOptions*/;
24 CREATE TABLE /*$wgDBprefix*/user_newtalk (
25 user_id INTEGER default '0',
26 user_ip varBLOB default '',
27 user_last_timestamp BLOB default '') /*$wgDBTableOptions*/;
29 CREATE TABLE /*$wgDBprefix*/page (
30 page_id INTEGER PRIMARY KEY AUTOINCREMENT,
31 page_namespace INTEGER ,
32 page_title varchar(255) ,
33 page_restrictions tinyblob ,
34 page_counter bigint default '0',
35 page_is_redirect tinyint default '0',
36 page_is_new tinyint default '0',
38 page_touched BLOB default '',
40 page_len INTEGER ) /*$wgDBTableOptions*/;
42 CREATE TABLE /*$wgDBprefix*/revision (
43 rev_id INTEGER PRIMARY KEY AUTOINCREMENT,
46 rev_comment tinyblob ,
47 rev_user INTEGER default '0',
48 rev_user_text varchar(255) default '',
49 rev_timestamp BLOB default '',
50 rev_minor_edit tinyint default '0',
51 rev_deleted tinyint default '0',
53 rev_parent_id INTEGER default NULL) /*$wgDBTableOptions*/;
55 CREATE TABLE /*$wgDBprefix*/text (
56 old_id INTEGER PRIMARY KEY AUTOINCREMENT,
58 old_flags tinyblob ) /*$wgDBTableOptions*/;
60 CREATE TABLE /*$wgDBprefix*/archive (
61 ar_namespace INTEGER default '0',
62 ar_title varchar(255) default '',
65 ar_user INTEGER default '0',
66 ar_user_text varchar(255) ,
67 ar_timestamp BLOB default '',
68 ar_minor_edit tinyint default '0',
72 ar_deleted tinyint default '0',
75 ar_parent_id INTEGER default NULL) /*$wgDBTableOptions*/;
77 CREATE TABLE /*$wgDBprefix*/pagelinks (
78 pl_from INTEGER default '0',
79 pl_namespace INTEGER default '0',
80 pl_title varchar(255) default '') /*$wgDBTableOptions*/;
82 CREATE TABLE /*$wgDBprefix*/templatelinks (
83 tl_from INTEGER default '0',
84 tl_namespace INTEGER default '0',
85 tl_title varchar(255) default '') /*$wgDBTableOptions*/;
87 CREATE TABLE /*$wgDBprefix*/imagelinks (
88 il_from INTEGER default '0',
89 il_to varchar(255) default '') /*$wgDBTableOptions*/;
91 CREATE TABLE /*$wgDBprefix*/categorylinks (
92 cl_from INTEGER default '0',
93 cl_to varchar(255) default '',
94 cl_sortkey varchar(70) default '',
95 cl_timestamp timestamp ) /*$wgDBTableOptions*/;
97 CREATE TABLE /*$wgDBprefix*/category (
98 cat_id INTEGER PRIMARY KEY AUTOINCREMENT,
99 cat_title varchar(255) ,
100 cat_pages INTEGER signed default 0,
101 cat_subcats INTEGER signed default 0,
102 cat_files INTEGER signed default 0,
103 cat_hidden tinyint default 0) /*$wgDBTableOptions*/;
105 CREATE TABLE /*$wgDBprefix*/externallinks (
106 el_from INTEGER default '0',
108 el_index blob ) /*$wgDBTableOptions*/;
110 CREATE TABLE /*$wgDBprefix*/langlinks (
111 ll_from INTEGER default '0',
112 ll_lang varBLOB default '',
113 ll_title varchar(255) default '') /*$wgDBTableOptions*/;
115 CREATE TABLE /*$wgDBprefix*/site_stats (
117 ss_total_views bigint default '0',
118 ss_total_edits bigint default '0',
119 ss_good_articles bigint default '0',
120 ss_total_pages bigint default '-1',
121 ss_users bigint default '-1',
122 ss_admins INTEGER default '-1',
123 ss_images INTEGER default '0') /*$wgDBTableOptions*/;
125 CREATE TABLE /*$wgDBprefix*/hitcounter (
129 CREATE TABLE /*$wgDBprefix*/ipblocks (
130 ipb_id INTEGER PRIMARY KEY AUTOINCREMENT,
131 ipb_address tinyblob ,
132 ipb_user INTEGER default '0',
133 ipb_by INTEGER default '0',
134 ipb_by_text varchar(255) default '',
135 ipb_reason tinyblob ,
136 ipb_timestamp BLOB default '',
137 ipb_auto bool default 0,
138 ipb_anon_only bool default 0,
139 ipb_create_account bool default 1,
140 ipb_enable_autoblock bool default '1',
141 ipb_expiry varBLOB default '',
142 ipb_range_start tinyblob ,
143 ipb_range_end tinyblob ,
144 ipb_deleted bool default 0,
145 ipb_block_email bool default 0) /*$wgDBTableOptions*/;
147 CREATE TABLE /*$wgDBprefix*/image (
148 img_name varchar(255) default '',
149 img_size INTEGER default '0',
150 img_width INTEGER default '0',
151 img_height INTEGER default '0',
152 img_metadata mediumblob ,
153 img_bits INTEGER default '0',
154 img_media_type TEXT default NULL,
155 img_major_mime TEXT default "unknown",
156 img_minor_mime varBLOB default "unknown",
157 img_description tinyblob ,
158 img_user INTEGER default '0',
159 img_user_text varchar(255) ,
160 img_timestamp varBLOB default '',
161 img_sha1 varBLOB default '') /*$wgDBTableOptions*/;
163 CREATE TABLE /*$wgDBprefix*/oldimage (
164 oi_name varchar(255) default '',
165 oi_archive_name varchar(255) default '',
166 oi_size INTEGER default 0,
167 oi_width INTEGER default 0,
168 oi_height INTEGER default 0,
169 oi_bits INTEGER default 0,
170 oi_description tinyblob ,
171 oi_user INTEGER default '0',
172 oi_user_text varchar(255) ,
173 oi_timestamp BLOB default '',
174 oi_metadata mediumblob ,
175 oi_media_type TEXT default NULL,
176 oi_major_mime TEXT default "unknown",
177 oi_minor_mime varBLOB default "unknown",
178 oi_deleted tinyint default '0',
179 oi_sha1 varBLOB default '') /*$wgDBTableOptions*/;
181 CREATE TABLE /*$wgDBprefix*/filearchive (
182 fa_id INTEGER PRIMARY KEY AUTOINCREMENT,
183 fa_name varchar(255) default '',
184 fa_archive_name varchar(255) default '',
185 fa_storage_group varBLOB,
186 fa_storage_key varBLOB default '',
188 fa_deleted_timestamp BLOB default '',
189 fa_deleted_reason text,
190 fa_size INTEGER default '0',
191 fa_width INTEGER default '0',
192 fa_height INTEGER default '0',
193 fa_metadata mediumblob,
194 fa_bits INTEGER default '0',
195 fa_media_type TEXT default NULL,
196 fa_major_mime TEXT default "unknown",
197 fa_minor_mime varBLOB default "unknown",
198 fa_description tinyblob,
199 fa_user INTEGER default '0',
200 fa_user_text varchar(255) ,
201 fa_timestamp BLOB default '',
202 fa_deleted tinyint default '0') /*$wgDBTableOptions*/;
204 CREATE TABLE /*$wgDBprefix*/recentchanges (
205 rc_id INTEGER PRIMARY KEY AUTOINCREMENT,
206 rc_timestamp varBLOB default '',
207 rc_cur_time varBLOB default '',
208 rc_user INTEGER default '0',
209 rc_user_text varchar(255) ,
210 rc_namespace INTEGER default '0',
211 rc_title varchar(255) default '',
212 rc_comment varchar(255) default '',
213 rc_minor tinyint default '0',
214 rc_bot tinyint default '0',
215 rc_new tinyint default '0',
216 rc_cur_id INTEGER default '0',
217 rc_this_oldid INTEGER default '0',
218 rc_last_oldid INTEGER default '0',
219 rc_type tinyint default '0',
220 rc_moved_to_ns tinyint default '0',
221 rc_moved_to_title varchar(255) default '',
222 rc_patrolled tinyint default '0',
223 rc_ip varBLOB default '',
226 rc_deleted tinyint default '0',
227 rc_logid INTEGER default '0',
228 rc_log_type varBLOB NULL default NULL,
229 rc_log_action varBLOB NULL default NULL,
230 rc_params blob NULL) /*$wgDBTableOptions*/;
232 CREATE TABLE /*$wgDBprefix*/watchlist (
234 wl_namespace INTEGER default '0',
235 wl_title varchar(255) default '',
236 wl_notificationtimestamp varBLOB) /*$wgDBTableOptions*/;
238 CREATE TABLE /*$wgDBprefix*/math (
239 math_inputhash varBLOB ,
240 math_outputhash varBLOB ,
241 math_html_conservativeness tinyint ,
243 math_mathml text) /*$wgDBTableOptions*/;
245 CREATE TABLE /*$wgDBprefix*/searchindex (
247 si_title varchar(255) default '',
248 si_text mediumtext );
250 CREATE TABLE /*$wgDBprefix*/interwiki (
251 iw_prefix varchar(32) ,
254 iw_trans tinyint default 0) /*$wgDBTableOptions*/;
256 CREATE TABLE /*$wgDBprefix*/querycache (
258 qc_value INTEGER default '0',
259 qc_namespace INTEGER default '0',
260 qc_title varchar(255) default '') /*$wgDBTableOptions*/;
262 CREATE TABLE /*$wgDBprefix*/objectcache (
263 keyname varBLOB default '',
265 exptime datetime) /*$wgDBTableOptions*/;
267 CREATE TABLE /*$wgDBprefix*/transcache (
270 tc_time INTEGER ) /*$wgDBTableOptions*/;
272 CREATE TABLE /*$wgDBprefix*/logging (
273 log_id INTEGER PRIMARY KEY AUTOINCREMENT,
274 log_type varBLOB default '',
275 log_action varBLOB default '',
276 log_timestamp BLOB default '19700101000000',
277 log_user INTEGER default 0,
278 log_namespace INTEGER default 0,
279 log_title varchar(255) default '',
280 log_comment varchar(255) default '',
282 log_deleted tinyint default '0') /*$wgDBTableOptions*/;
284 CREATE TABLE /*$wgDBprefix*/trackbacks (
285 tb_id INTEGER PRIMARY KEY AUTOINCREMENT,
286 tb_page INTEGER REFERENCES /*$wgDBprefix*/page(page_id) ON DELETE CASCADE,
287 tb_title varchar(255) ,
290 tb_name varchar(255)) /*$wgDBTableOptions*/;
292 CREATE TABLE /*$wgDBprefix*/job (
293 job_id INTEGER PRIMARY KEY AUTOINCREMENT,
294 job_cmd varBLOB default '',
295 job_namespace INTEGER ,
296 job_title varchar(255) ,
297 job_params blob ) /*$wgDBTableOptions*/;
299 CREATE TABLE /*$wgDBprefix*/querycache_info (
300 qci_type varBLOB default '',
301 qci_timestamp BLOB default '19700101000000') /*$wgDBTableOptions*/;
303 CREATE TABLE /*$wgDBprefix*/redirect (
304 rd_from INTEGER default '0',
305 rd_namespace INTEGER default '0',
306 rd_title varchar(255) default '') /*$wgDBTableOptions*/;
308 CREATE TABLE /*$wgDBprefix*/querycachetwo (
310 qcc_value INTEGER default '0',
311 qcc_namespace INTEGER default '0',
312 qcc_title varchar(255) default '',
313 qcc_namespacetwo INTEGER default '0',
314 qcc_titletwo varchar(255) default '') /*$wgDBTableOptions*/;
316 CREATE TABLE /*$wgDBprefix*/page_restrictions (
321 pr_user INTEGER NULL,
322 pr_expiry varBLOB NULL,
323 pr_id INTEGER PRIMARY KEY AUTOINCREMENT) /*$wgDBTableOptions*/;
325 CREATE TABLE /*$wgDBprefix*/protected_titles (
326 pt_namespace INTEGER ,
327 pt_title varchar(255) ,
331 pt_expiry varBLOB default '',
332 pt_create_perm varBLOB ) /*$wgDBTableOptions*/;
334 CREATE TABLE /*$wgDBprefix*/page_props (
336 pp_propname varBLOB ,
337 pp_value blob ) /*$wgDBTableOptions*/;
339 CREATE TABLE /*$wgDBprefix*/updatelog (
340 ul_key varchar(255) ) /*$wgDBTableOptions*/;