Merge "Remove some SQLite specific files"

This commit is contained in:
jenkins-bot 2020-05-09 02:31:24 +00:00 committed by Gerrit Code Review
commit f3478a5479
5 changed files with 15 additions and 42 deletions

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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