1 -- Add the logging table and adjust recentchanges to accomodate special pages
4 CREATE TABLE /*$wgDBprefix*/logging (
5 -- Symbolic keys for the general log type and the action type
6 -- within the log. The output format will be controlled by the
7 -- action field, but only the type controls categorization.
8 log_type varbinary(10) NOT NULL default '',
9 log_action varbinary(10) NOT NULL default '',
12 log_timestamp binary(14) NOT NULL default '19700101000000',
14 -- The user who performed this action; key to user_id
15 log_user int unsigned NOT NULL default 0,
17 -- Key to the page affected. Where a user is the target,
18 -- this will point to the user page.
19 log_namespace int NOT NULL default 0,
20 log_title varchar(255) binary NOT NULL default '',
22 -- Freeform text. Interpreted as edit history comments.
23 log_comment varchar(255) NOT NULL default '',
25 -- LF separated list of miscellaneous parameters
26 log_params blob NOT NULL,
28 KEY type_time (log_type, log_timestamp),
29 KEY user_time (log_user, log_timestamp),
30 KEY page_time (log_namespace, log_title, log_timestamp)
32 ) /*$wgDBTableOptions*/;
35 -- Change from unsigned to signed so we can store special pages
36 ALTER TABLE recentchanges
37 MODIFY rc_namespace tinyint(3) NOT NULL default '0';