mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-24 06:03:49 +00:00
Merge "Remove some SQLite specific files"
This commit is contained in:
commit
f3478a5479
|
@ -10,11 +10,9 @@ CREATE TABLE /*$wgDBprefix*/abuse_filter_history (
|
|||
afh_comments BLOB NOT NULL,
|
||||
afh_flags TINYBLOB NOT NULL,
|
||||
afh_public_comments TINYBLOB,
|
||||
afh_actions BLOB,
|
||||
|
||||
PRIMARY KEY (afh_id),
|
||||
KEY (afh_filter),
|
||||
KEY (afh_user),
|
||||
KEY (afh_user_text),
|
||||
KEY (afh_timestamp)
|
||||
afh_actions BLOB
|
||||
) /*$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);
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
-- Patch to add abuse_filter_history table
|
||||
|
||||
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
|
||||
) /*$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);
|
|
@ -1,3 +1,3 @@
|
|||
-- Add abuse_filter_log idex for afl_wiki.
|
||||
-- Add abuse_filter_log index for afl_wiki.
|
||||
|
||||
ALTER TABLE /*_*/abuse_filter_log ADD KEY wiki_timestamp (afl_wiki, afl_timestamp);
|
||||
CREATE INDEX afl_wiki_timestamp ON /*$wgDBprefix*/abuse_filter_log (afl_wiki, afl_timestamp);
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
-- Add abuse_filter_log index for afl_wiki.
|
||||
|
||||
CREATE INDEX afl_wiki_timestamp ON /*$wgDBprefix*/abuse_filter_log (afl_wiki, afl_timestamp);
|
|
@ -453,14 +453,13 @@ class AbuseFilterHooks {
|
|||
if ( $updater->getDB()->getType() === 'mysql' ) {
|
||||
$updater->addExtensionUpdate( [ 'addTable', 'abuse_filter',
|
||||
"$dir/abusefilter.tables.sql", true ] );
|
||||
$updater->addExtensionUpdate( [ 'addTable', 'abuse_filter_history',
|
||||
"$dir/db_patches/patch-abuse_filter_history.sql", true ] );
|
||||
} else {
|
||||
$updater->addExtensionUpdate( [ 'addTable', 'abuse_filter',
|
||||
"$dir/abusefilter.tables.sqlite.sql", true ] );
|
||||
$updater->addExtensionUpdate( [ 'addTable', 'abuse_filter_history',
|
||||
"$dir/db_patches/patch-abuse_filter_history.sqlite.sql", true ] );
|
||||
}
|
||||
$updater->addExtensionTable( 'abuse_filter_history',
|
||||
"$dir/db_patches/patch-abuse_filter_history.sql" );
|
||||
|
||||
$updater->addExtensionUpdate( [
|
||||
'addField', 'abuse_filter_history', 'afh_changed_fields',
|
||||
"$dir/db_patches/patch-afh_changed_fields.sql", true
|
||||
|
@ -486,20 +485,17 @@ class AbuseFilterHooks {
|
|||
$updater->addExtensionUpdate( [ 'addField', 'abuse_filter',
|
||||
'af_group', "$dir/db_patches/patch-af_group.sql", true ] );
|
||||
|
||||
$updater->addExtensionIndex(
|
||||
'abuse_filter_log', 'afl_wiki_timestamp',
|
||||
"$dir/db_patches/patch-global_logging_wiki-index.sql"
|
||||
);
|
||||
|
||||
if ( $updater->getDB()->getType() === 'mysql' ) {
|
||||
$updater->addExtensionUpdate( [
|
||||
'addIndex', 'abuse_filter_log', 'wiki_timestamp',
|
||||
"$dir/db_patches/patch-global_logging_wiki-index.sql", true
|
||||
] );
|
||||
$updater->addExtensionUpdate( [
|
||||
'modifyField', 'abuse_filter_log', 'afl_namespace',
|
||||
"$dir/db_patches/patch-afl-namespace_int.sql", true
|
||||
] );
|
||||
} else {
|
||||
$updater->addExtensionUpdate( [
|
||||
'addIndex', 'abuse_filter_log', 'afl_wiki_timestamp',
|
||||
"$dir/db_patches/patch-global_logging_wiki-index.sqlite.sql", true
|
||||
] );
|
||||
$updater->addExtensionUpdate( [
|
||||
'modifyField', 'abuse_filter_log', 'afl_namespace',
|
||||
"$dir/db_patches/patch-afl-namespace_int.sqlite.sql", true
|
||||
|
|
Loading…
Reference in a new issue