mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-23 21:53:35 +00:00
Rename filter_timestamp index in a different file
Otherwise there might be interferences with the remove-afl_filter patch. Bug: T291725 Change-Id: If339663d491e1da4a118c13cd667d228365b4864
This commit is contained in:
parent
04552f00db
commit
5e95676e99
2
db_patches/mysql/patch-rename-filter_timestamp-index.sql
Normal file
2
db_patches/mysql/patch-rename-filter_timestamp-index.sql
Normal file
|
@ -0,0 +1,2 @@
|
|||
ALTER TABLE /*_*/abuse_filter_log DROP INDEX /*i*/filter_timestamp;
|
||||
CREATE INDEX /*i*/afl_filter_timestamp ON /*$wgDBprefix*/abuse_filter_log (afl_filter,afl_timestamp);
|
|
@ -5,12 +5,10 @@ ALTER TABLE /*_*/abuse_filter
|
|||
ADD INDEX /*i*/af_group_enabled(af_group,af_enabled,af_id);
|
||||
|
||||
ALTER TABLE /*_*/abuse_filter_log
|
||||
DROP INDEX /*i*/filter_timestamp,
|
||||
DROP INDEX /*i*/filter_timestamp_full,
|
||||
DROP INDEX /*i*/user_timestamp,
|
||||
DROP INDEX /*i*/page_timestamp,
|
||||
DROP INDEX /*i*/ip_timestamp;
|
||||
CREATE INDEX /*i*/afl_filter_timestamp ON /*$wgDBprefix*/abuse_filter_log (afl_filter,afl_timestamp);
|
||||
CREATE INDEX /*i*/afl_filter_timestamp_full ON /*$wgDBprefix*/abuse_filter_log (afl_global,afl_filter_id,afl_timestamp);
|
||||
CREATE INDEX /*i*/afl_user_timestamp ON /*$wgDBprefix*/abuse_filter_log (afl_user,afl_user_text,afl_timestamp);
|
||||
CREATE INDEX /*i*/afl_page_timestamp ON /*$wgDBprefix*/abuse_filter_log (afl_namespace, afl_title, afl_timestamp);
|
||||
|
|
|
@ -86,6 +86,14 @@ class SchemaChangesHandler implements LoadExtensionSchemaUpdatesHook {
|
|||
"$dir/mysql/patch-rename-wiki-timestamp-index.sql",
|
||||
true
|
||||
);
|
||||
// This one is also separate to avoid interferences with the afl_filter field removal below.
|
||||
$updater->renameExtensionIndex(
|
||||
'abuse_filter_log',
|
||||
'filter_timestamp',
|
||||
'afl_filter_timestamp',
|
||||
"$dir/mysql/patch-rename-filter_timestamp-index.sql",
|
||||
true
|
||||
);
|
||||
}
|
||||
$updater->dropExtensionField(
|
||||
'abuse_filter_log',
|
||||
|
|
Loading…
Reference in a new issue