Index: trunk/extensions/CentralNotice/patches/patch-notice_logs.sql |
— | — | @@ -0,0 +1,34 @@ |
| 2 | +-- Update to allow for logging of changes to campaign settings. |
| 3 | + |
| 4 | +CREATE TABLE IF NOT EXISTS /*$wgDBprefix*/cn_log ( |
| 5 | + `notlog_id` int unsigned NOT NULL PRIMARY KEY auto_increment, |
| 6 | + `notlog_timestamp` binary(14) NOT NULL, |
| 7 | + `notlog_user_id` int unsigned NOT NULL, |
| 8 | + `notlog_action` enum('created','modified','removed') NOT NULL DEFAULT 'modified', |
| 9 | + `notlog_not_id` int unsigned NOT NULL, |
| 10 | + `notlog_begin_name` varchar(255), |
| 11 | + `notlog_end_name` varchar(255), |
| 12 | + `notlog_begin_projects` varchar(255), |
| 13 | + `notlog_end_projects` varchar(255), |
| 14 | + `notlog_begin_languages` text, |
| 15 | + `notlog_end_languages` text, |
| 16 | + `notlog_begin_countries` text, |
| 17 | + `notlog_end_countries` text, |
| 18 | + `notlog_begin_start` char(14), |
| 19 | + `notlog_end_start` char(14), |
| 20 | + `notlog_begin_end` char(14), |
| 21 | + `notlog_end_end` char(14), |
| 22 | + `notlog_begin_enabled` tinyint(1), |
| 23 | + `notlog_end_enabled` tinyint(1), |
| 24 | + `notlog_begin_preferred` tinyint(1), |
| 25 | + `notlog_end_preferred` tinyint(1), |
| 26 | + `notlog_begin_locked` tinyint(1), |
| 27 | + `notlog_end_locked` tinyint(1), |
| 28 | + `notlog_begin_geo` tinyint(1), |
| 29 | + `notlog_end_geo` tinyint(1), |
| 30 | + `notlog_begin_assignments` text, |
| 31 | + `notlog_end_assignments` text |
| 32 | +) /*$wgDBTableOptions*/; |
| 33 | +CREATE INDEX /*i*/notlog_timestamp ON /*_*/cn_log (notlog_timestamp); |
| 34 | +CREATE INDEX /*i*/notlog_user_id ON /*_*/cn_log (notlog_user_id, notlog_timestamp); |
| 35 | +CREATE INDEX /*i*/notlog_not_id ON /*_*/cn_log (notlog_not_id, notlog_timestamp); |
\ No newline at end of file |