2011-11-08 03:07:01 +00:00
|
|
|
-- SQL tables for AbuseFilter extension
|
|
|
|
|
|
|
|
CREATE TABLE /*$wgDBprefix*/abuse_filter (
|
2018-05-14 09:13:33 +00:00
|
|
|
af_id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
2011-11-08 03:07:01 +00:00
|
|
|
af_pattern BLOB NOT NULL,
|
|
|
|
af_user BIGINT unsigned NOT NULL,
|
2018-05-14 09:13:33 +00:00
|
|
|
af_user_text varbinary(255) NOT NULL,
|
|
|
|
af_timestamp varbinary(14) NOT NULL,
|
2011-11-08 03:07:01 +00:00
|
|
|
af_enabled tinyint(1) not null default 1,
|
|
|
|
af_comments BLOB,
|
|
|
|
af_public_comments TINYBLOB,
|
|
|
|
af_hidden tinyint(1) not null default 0,
|
|
|
|
af_hit_count bigint not null default 0,
|
|
|
|
af_throttled tinyint(1) NOT NULL default 0,
|
|
|
|
af_deleted tinyint(1) NOT NULL DEFAULT 0,
|
2018-05-14 09:13:33 +00:00
|
|
|
af_actions varbinary(255) NOT NULL DEFAULT '',
|
2011-11-08 03:07:01 +00:00
|
|
|
af_global tinyint(1) NOT NULL DEFAULT 0
|
2018-05-19 20:14:55 +00:00
|
|
|
af_group varbinary(64) binary NOT NULL DEFAULT 'default'
|
2011-11-08 03:07:01 +00:00
|
|
|
) /*$wgDBTableOptions*/;
|
|
|
|
CREATE INDEX af_user ON /*$wgDBprefix*/abuse_filter (af_user);
|
2018-05-19 20:14:55 +00:00
|
|
|
CREATE INDEX af_group_enabled ON /*$wgDBprefix*/abuse_filter (af_group,af_enabled,af_id);
|
2011-11-08 03:07:01 +00:00
|
|
|
|
|
|
|
CREATE TABLE /*$wgDBprefix*/abuse_filter_action (
|
2018-05-14 09:13:33 +00:00
|
|
|
afa_filter INTEGER NOT NULL,
|
|
|
|
afa_consequence varbinary(255) NOT NULL,
|
2011-11-08 03:07:01 +00:00
|
|
|
afa_parameters TINYBLOB NOT NULL,
|
|
|
|
|
|
|
|
PRIMARY KEY (afa_filter,afa_consequence)
|
|
|
|
) /*$wgDBTableOptions*/;
|
|
|
|
CREATE INDEX afa_consequence ON /*$wgDBprefix*/abuse_filter_action (afa_consequence);
|
|
|
|
|
|
|
|
CREATE TABLE /*$wgDBprefix*/abuse_filter_log (
|
2018-05-14 09:13:33 +00:00
|
|
|
afl_id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
|
|
|
afl_filter varbinary(64) NOT NULL,
|
2011-11-08 03:07:01 +00:00
|
|
|
afl_user BIGINT unsigned NOT NULL,
|
2018-05-14 09:13:33 +00:00
|
|
|
afl_user_text varbinary(255) NOT NULL,
|
|
|
|
afl_ip varbinary(255) not null,
|
2011-11-08 03:07:01 +00:00
|
|
|
afl_action varbinary(255) not null,
|
|
|
|
afl_actions varbinary(255) not null,
|
|
|
|
afl_var_dump BLOB NOT NULL,
|
2018-05-14 09:13:33 +00:00
|
|
|
afl_timestamp varbinary(14) NOT NULL,
|
2014-01-30 20:27:52 +00:00
|
|
|
afl_namespace int NOT NULL,
|
2018-05-14 09:13:33 +00:00
|
|
|
afl_title varbinary(255) NOT NULL,
|
|
|
|
afl_wiki varbinary(64) NULL,
|
2011-11-08 03:07:01 +00:00
|
|
|
afl_deleted tinyint(1) NOT NULL DEFAULT 0,
|
2018-05-19 20:14:55 +00:00
|
|
|
afl_patrolled_by int unsigned NULL,
|
|
|
|
afl_rev_id int unsigned,
|
|
|
|
afl_log_id int unsigned
|
2011-11-08 03:07:01 +00:00
|
|
|
) /*$wgDBTableOptions*/;
|
|
|
|
CREATE INDEX afl_filter_timestamp ON /*$wgDBprefix*/abuse_filter_log (afl_filter,afl_timestamp);
|
|
|
|
CREATE INDEX afl_user_timestamp ON /*$wgDBprefix*/abuse_filter_log (afl_user,afl_user_text,afl_timestamp);
|
|
|
|
CREATE INDEX afl_timestamp ON /*$wgDBprefix*/abuse_filter_log (afl_timestamp);
|
|
|
|
CREATE INDEX afl_page_timestamp ON /*$wgDBprefix*/abuse_filter_log (afl_namespace, afl_title, afl_timestamp);
|
|
|
|
CREATE INDEX afl_ip_timestamp ON /*$wgDBprefix*/abuse_filter_log (afl_ip, afl_timestamp);
|
2012-08-03 21:55:35 +00:00
|
|
|
CREATE INDEX afl_wiki_timestamp ON /*$wgDBprefix*/abuse_filter_log (afl_wiki, afl_timestamp);
|
2018-05-19 20:14:55 +00:00
|
|
|
CREATE INDEX afl_rev_id ON /*$wgDBprefix*/abuse_filter_log KEY (afl_rev_id);
|
|
|
|
CREATE INDEX afl_log_id ON /*$wgDBprefix*/abuse_filter_log KEY (afl_log_id);
|
2011-11-08 03:07:01 +00:00
|
|
|
|
|
|
|
CREATE TABLE /*$wgDBprefix*/abuse_filter_history (
|
2018-05-14 09:13:33 +00:00
|
|
|
afh_id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
|
|
|
afh_filter INTEGER NOT NULL,
|
2011-11-08 03:07:01 +00:00
|
|
|
afh_user BIGINT unsigned NOT NULL,
|
2018-05-14 09:13:33 +00:00
|
|
|
afh_user_text varbinary(255) NOT NULL,
|
|
|
|
afh_timestamp varbinary(14) NOT NULL,
|
2011-11-08 03:07:01 +00:00
|
|
|
afh_pattern BLOB NOT NULL,
|
|
|
|
afh_comments BLOB NOT NULL,
|
|
|
|
afh_flags TINYBLOB NOT NULL,
|
|
|
|
afh_public_comments TINYBLOB,
|
|
|
|
afh_actions BLOB,
|
|
|
|
afh_deleted tinyint(1) NOT NULL DEFAULT 0,
|
2018-05-14 09:13:33 +00:00
|
|
|
afh_changed_fields varbinary(255) NOT NULL DEFAULT ''
|
2018-05-19 20:14:55 +00:00
|
|
|
afh_group varchar(64) binary NULL
|
2011-11-08 03:07:01 +00:00
|
|
|
) /*$wgDBTableOptions*/;
|
|
|
|
CREATE INDEX afh_filter ON /*$wgDBprefix*/abuse_filter_history (afh_filter);
|
|
|
|
CREATE INDEX afh_user ON /*$wgDBprefix*/abuse_filter_history (afh_user);
|
|
|
|
CREATE INDEX afh_user_text ON /*$wgDBprefix*/abuse_filter_history (afh_user_text);
|
|
|
|
CREATE INDEX afh_timestamp ON /*$wgDBprefix*/abuse_filter_history (afh_timestamp);
|