2008-06-27 06:18:51 +00:00
|
|
|
-- SQL tables for AbuseFilter extension
|
|
|
|
|
|
|
|
CREATE TABLE /*$wgDBprefix*/abuse_filter (
|
|
|
|
af_id BIGINT unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
af_pattern BLOB NOT NULL,
|
|
|
|
af_user BIGINT unsigned NOT NULL,
|
|
|
|
af_user_text varchar(255) binary NOT NULL,
|
|
|
|
af_timestamp binary(14) NOT NULL,
|
|
|
|
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,
|
2008-07-17 02:43:45 +00:00
|
|
|
af_throttled tinyint(1) NOT NULL default 0,
|
2008-09-05 14:27:18 +00:00
|
|
|
af_deleted tinyint(1) NOT NULL DEFAULT 0,
|
2009-01-27 18:32:17 +00:00
|
|
|
af_actions varchar(255) NOT NULL DEFAULT '',
|
2009-03-30 06:12:12 +00:00
|
|
|
af_global tinyint(1) NOT NULL DEFAULT 0,
|
2012-05-06 06:44:45 +00:00
|
|
|
af_group varchar(64) binary NOT NULL DEFAULT 'default',
|
2012-02-17 01:43:47 +00:00
|
|
|
|
2008-06-27 06:18:51 +00:00
|
|
|
PRIMARY KEY (af_id),
|
2012-05-06 06:44:45 +00:00
|
|
|
KEY (af_user),
|
|
|
|
KEY (af_group,af_enabled,af_id)
|
2008-06-27 06:18:51 +00:00
|
|
|
) /*$wgDBTableOptions*/;
|
|
|
|
|
|
|
|
CREATE TABLE /*$wgDBprefix*/abuse_filter_action (
|
|
|
|
afa_filter BIGINT unsigned NOT NULL,
|
|
|
|
afa_consequence varchar(255) NOT NULL,
|
|
|
|
afa_parameters TINYBLOB NOT NULL,
|
2012-02-17 01:43:47 +00:00
|
|
|
|
2008-06-27 09:49:26 +00:00
|
|
|
PRIMARY KEY (afa_filter,afa_consequence),
|
2008-06-27 06:18:51 +00:00
|
|
|
KEY (afa_consequence)
|
|
|
|
) /*$wgDBTableOptions*/;
|
|
|
|
|
|
|
|
CREATE TABLE /*$wgDBprefix*/abuse_filter_log (
|
|
|
|
afl_id BIGINT unsigned NOT NULL AUTO_INCREMENT,
|
2009-03-30 06:12:12 +00:00
|
|
|
afl_filter varchar(64) binary NOT NULL,
|
2008-06-27 06:18:51 +00:00
|
|
|
afl_user BIGINT unsigned NOT NULL,
|
|
|
|
afl_user_text varchar(255) binary NOT NULL,
|
|
|
|
afl_ip varchar(255) not null,
|
|
|
|
afl_action varbinary(255) not null,
|
2008-06-27 08:05:28 +00:00
|
|
|
afl_actions varbinary(255) not null,
|
2009-02-27 03:06:19 +00:00
|
|
|
afl_var_dump BLOB NOT NULL,
|
2008-06-27 06:18:51 +00:00
|
|
|
afl_timestamp binary(14) NOT NULL,
|
|
|
|
afl_namespace tinyint NOT NULL,
|
|
|
|
afl_title varchar(255) binary NOT NULL,
|
2009-03-30 06:12:12 +00:00
|
|
|
afl_wiki varchar(64) binary NULL,
|
2010-06-25 20:04:55 +00:00
|
|
|
afl_deleted tinyint(1) NOT NULL DEFAULT 0,
|
2009-06-08 09:35:05 +00:00
|
|
|
afl_patrolled_by int unsigned NULL,
|
2012-02-17 01:43:47 +00:00
|
|
|
afl_rev_id int unsigned,
|
|
|
|
afl_log_id int unsigned,
|
|
|
|
|
2008-06-27 06:18:51 +00:00
|
|
|
PRIMARY KEY (afl_id),
|
2010-06-25 00:06:07 +00:00
|
|
|
KEY filter_timestamp (afl_filter,afl_timestamp),
|
|
|
|
KEY user_timestamp (afl_user,afl_user_text,afl_timestamp),
|
2008-06-27 06:18:51 +00:00
|
|
|
KEY (afl_timestamp),
|
2010-06-25 00:06:07 +00:00
|
|
|
KEY page_timestamp (afl_namespace, afl_title, afl_timestamp),
|
2012-02-17 01:43:47 +00:00
|
|
|
KEY ip_timestamp (afl_ip, afl_timestamp),
|
|
|
|
KEY (afl_rev_id),
|
2012-08-03 21:55:35 +00:00
|
|
|
KEY (afl_log_id),
|
|
|
|
KEY wiki_timestamp (afl_wiki, afl_timestamp)
|
2008-08-03 14:04:26 +00:00
|
|
|
) /*$wgDBTableOptions*/;
|
|
|
|
|
|
|
|
CREATE TABLE /*$wgDBprefix*/abuse_filter_history (
|
|
|
|
afh_id BIGINT unsigned NOT NULL AUTO_INCREMENT,
|
|
|
|
afh_filter BIGINT unsigned NOT NULL,
|
|
|
|
afh_user BIGINT unsigned NOT NULL,
|
|
|
|
afh_user_text varchar(255) binary NOT NULL,
|
|
|
|
afh_timestamp binary(14) NOT NULL,
|
|
|
|
afh_pattern BLOB NOT NULL,
|
|
|
|
afh_comments BLOB NOT NULL,
|
|
|
|
afh_flags TINYBLOB NOT NULL,
|
|
|
|
afh_public_comments TINYBLOB,
|
|
|
|
afh_actions BLOB,
|
2008-09-29 13:30:11 +00:00
|
|
|
afh_deleted tinyint(1) NOT NULL DEFAULT 0,
|
2009-01-26 22:31:02 +00:00
|
|
|
afh_changed_fields varchar(255) NOT NULL DEFAULT '',
|
2012-05-06 06:44:45 +00:00
|
|
|
afh_group varchar(64) binary NULL,
|
2012-02-17 01:43:47 +00:00
|
|
|
|
2008-08-03 14:04:26 +00:00
|
|
|
PRIMARY KEY (afh_id),
|
|
|
|
KEY (afh_filter),
|
|
|
|
KEY (afh_user),
|
|
|
|
KEY (afh_user_text),
|
|
|
|
KEY (afh_timestamp)
|
2009-01-27 19:04:17 +00:00
|
|
|
) /*$wgDBTableOptions*/;
|