Commit graph

39 commits

Author SHA1 Message Date
Umherirrender e18136f269 Convert to abstract schema
Rename index on postgres and fix nullable fields

Bug: T259377
Change-Id: I97cb12e6aa25d75ea24e187174db2fe88e5ce790
2022-06-20 17:19:57 +00:00
Daimona Eaytoy 5e95676e99 Rename filter_timestamp index in a different file
Otherwise there might be interferences with the remove-afl_filter patch.

Bug: T291725
Change-Id: If339663d491e1da4a118c13cd667d228365b4864
2021-10-20 15:22:04 +02:00
Daimona Eaytoy 04552f00db Revert "Remove references to afl_filter"
This reverts commit ce71c23bb0.

Reason for revert: Ewww, my bad. patch-remove-afl_filter looks for the new index name. This needs a different solution.

Change-Id: Ia72bb936cd414ee79d710eb9d91bb815d3e59a6c
2021-10-20 13:14:57 +00:00
Daimona Eaytoy ce71c23bb0 Remove references to afl_filter
Removed in 1.38 (Ic6b1c8a22d17a301faf32d2e23778d90c41c39de), so no need
to rename it (plus, the rename will fail if the index is not there).
Removing the index is taken care of by patch-remove-afl_filter.sql.

Bug: T291725
Change-Id: I32f116ce7ac0fdd25fe13f0665a5cf04766e6f27
2021-10-17 19:26:44 +02:00
Daimona Eaytoy f2e2f5ae48 Move renaming of the afl_wiki_timestamp index to its own file
Note that this doesn't have to be applied in WMF prod, since the indexes
are already correct there.

Bug: T291725
Change-Id: I7fcee0581f469e0d7ada43d1f30f31061c5bf5c0
2021-10-16 16:55:52 +00:00
Reedy 026f8a44cd Make mysql/patch-remove-afl_filter.sql valid SQL
Follows-Up: Ic6b1c8a22d17a301faf32d2e23778d90c41c39de
Change-Id: I3d480d7b709b06d7ac213a81b4e0273a2ee385e9
2021-09-25 03:41:43 +01:00
Daimona Eaytoy dae374aec2 Remove afl_filter entirely
As per T220791, the old schema and the flag can be removed in 1.38.

Bug: T220791
Change-Id: Ic6b1c8a22d17a301faf32d2e23778d90c41c39de
2021-09-18 11:06:10 +00:00
Daimona Eaytoy 91d9e2e0d3 Give MySQL indexes explicit names, align MySQL and SQLite
Bug: T251613
Change-Id: I574bda15f0f5c92a7d97a6e3150981b8f97ee7fc
2021-04-15 11:30:30 +02:00
Daimona Eaytoy 560d6fe7b5 Drop database patches for MW < 1.27
Bug: T280012
Change-Id: I4ba68f1c7784f7f8b4cf661fe5e0918103c9dc15
2021-04-13 14:12:05 +02:00
Reedy 95d8278b58 Clean up SchemaChangeHandler
* Move all SQL files into db_patches (or below)
** Remove db type from filename
* Remove a lot of duplicated code and simplify

Change-Id: If22f2a2c46a59ac24c89ce612c74d169f053ab26
2020-11-29 19:14:24 +00:00
jenkins-bot 2cdec2473e Merge "Actually apply patch-afl_change_deleted_patrolled." 2020-10-05 08:15:48 +00:00
Daimona Eaytoy 01cc79e1d4 Revert "Drop duplicate index wiki_timestamp"
This reverts commit 6a268e7339.

Reason for revert: Ic1252efe9f96743d9402fa31a7b2dca1f57ff6ae ended up not renaming the index, so this patch removed an index that was still in use.

Change-Id: Ide4a600a57bcfa4da0c7354b972cc89709ccd660
2020-09-23 10:39:19 +00:00
Alexia E. Smith 422b77ab0e Actually apply patch-afl_change_deleted_patrolled.
This fixes the abuse_filter_log patch-afl_change_deleted_patrolled
not being applied. The patch is provided for (and should work with) all
the supported DBMS.
Additionally, fix the base table files, which would report
afl_patrolled_by as 'NULL', whereas on the WMF cluster it's 'NOT NULL
DEFAULT 0'. The schema patch takes care of converting that column as
well.

Note that this schema change needs not be applied on the WMF cluster, as
that's already up-to-date.

Finally, note that this patch must be backported to 1.33 and 1.34 (and
it might be fairly hard due to the recent schema changes on the
abuse_filter_log table).

Bug: T240895
Change-Id: Ibdbc9b50c25b9e871ebdeae93a54d10877b585f8
2020-09-21 14:52:22 +00:00
Daimona Eaytoy 6a268e7339 Drop duplicate index wiki_timestamp
For MySQL it was renamed Ic1252efe9f96743d9402fa31a7b2dca1f57ff6ae, but
the old index isn't being deleted, hence creating a duplicate.

Change-Id: I09b9f64759f6a897c393caa77458d63995d5713b
2020-06-12 19:34:41 +02:00
Reedy 7a2373f7d8 Remove some SQLite specific files
Bug: T251613
Change-Id: Ic1252efe9f96743d9402fa31a7b2dca1f57ff6ae
2020-05-04 17:50:18 +00:00
Daimona Eaytoy 9a6dd1307c Add new schemas for splitting afl_filter
It'd be great if we could get this included in 1.34.

Bug: T220791
Change-Id: I62d429d0eb6a7adc51cc37fe18f878077f85a006
2019-09-22 16:04:45 +00:00
Daimona Eaytoy 0b925da36e Drop afl_log_id
Field unused since its introduction.

Bug: T214592
Change-Id: I1f4f775e9678de5184672251631a490e4eb81764
2019-06-28 17:55:55 +00:00
Matěj Suchánek 99c2749511 Fix issues with SQLite
Bug: T199507
Change-Id: I273de5ebafeee76458a5b873e893044b683c34ca
2019-03-01 10:44:58 +01:00
se4598 03f18d2578 abuse_filter_log table only uses tinyint not int for namespace ID
Bug: 31397
Change-Id: Ifb1275798a8dc383d37743fb75b93d162360424c
2014-03-04 02:24:27 +00:00
Dereckson a2c9ffc8cf Adding back /*_*/ prefix to table in patch-afl_action_id.sql
This is a follow-up of change Ie2ea51b854df6bc1c8d3219663a9e91ff8a91d2b.

Change-Id: Id52ba8892880d97ae605b9d7052206e30f80bc60
2013-12-23 01:39:33 +01:00
Dereckson 2fcb9e51df (bug 38371) Fixing SQL files for SQLite compatibility
Change-Id: Ie2ea51b854df6bc1c8d3219663a9e91ff8a91d2b
2013-07-10 16:50:49 +02:00
csteipp 1973ea6714 Add Global Rules
* Update rules list view to show global rules toggle, global rules
* Update rule processing to get global rules from memcache, if no
rule exists, get them from the central database and store them in
memcache
* Delete global rule key whenever global rules are updated
* Add filtering for log by wiki on the central database, updated
table definitions to add index on afl_wiki
* Add global $wgAbuseFilterDisallowGlobalLocalBlocks so local wikis
can prevent global rules from locally blocking, removing or revoking
permissions.

* patchset 13: Include recommendations from Tim. Add db updates to
LoadExtensionSchemaUpdates hook.
* patchset 14: forgot to add new files

Change-Id: Id69a9d603f9679f838e8691c651a3e9d8461b422
2012-08-27 03:30:07 +00:00
Andrew Garrett 53aea9c0ce AbuseFilter: Resolve bug 18374, bug 28633.
* Store the revision ID associated with a log entry
 if the action is successful.
* Expose this as a diff link in the UI.
* Implicitly hide log entries if their
 corresponding revisions are also hidden.
* Includes scope for expanding to log entries if desired.

Change-Id: Ie2d43dd1bacf14289fdf0492bb22267590ee649d
2012-07-11 10:16:59 -04:00
Andrew Garrett dc207d0cbd Abuse Filter: Allow filters to be split into "groups" for the purposes of operating them on different types of input.
The purpose of this change is to allow AFTv5 developers to run a separate list of filters against article feedback actions without issues of cross-contamination and bumping up against the condition limit.

Change-Id: I758795f01eaf3ff56c5720d660cd989ef95764a7
2012-05-12 12:53:32 +10:00
Roan Kattouw 6c4bd57043 Revert r111217 (unreviewed rev in AbuseFilter) and its dependencies r113585, r113587, r113588, r113589.
All of these revisions are tagged with 'gerritmigration' and will be resubmitted into Gerrit after the Gerrit switchover. See also http://lists.wikimedia.org/pipermail/wikitech-l/2012-March/059124.html
2012-03-21 19:41:11 +00:00
Andrew Garrett 5e4289ce4e AbuseFilter: Resolve bugs 18374, 28633.
* Store the revision ID associated with a log entry if the action is successful.
* Expose this as a diff link in the UI.
* Implicitly hide log entries if their corresponding revisions are also hidden.
* Includes scope for expanding to log entries if desired.
2012-02-10 23:41:05 +00:00
Mark A. Hershberger f90dc2bcc9 Split AbuseFilter schema updates for SQLite out after briefly talking
with MaxSem about the desired course of action.  Perhaps later these
can be merged back, but this seemed to be the quickest way to get
AbuseFilter working with SQLite working for now.
2011-11-08 03:07:01 +00:00
Roan Kattouw 1ee749a966 AbuseFilter: Add .sql patch for the changes in r68584. Not used by anything in the software, but useful for applying the change to the WMF cluster 2011-01-26 22:35:07 +00:00
Andrew Garrett fe39e38282 AbuseFilter: Introduce hiding of abuse log entries, controlled by abusefilter-hidden-log and abusefilter-hide-log rights. 2010-06-25 20:04:55 +00:00
Andrew Garrett bd6ab24e2c AbuseFilter: Fix mSearchUser on abuse log. 2010-06-25 00:06:07 +00:00
Andrew Garrett f87df5f8d6 Move abuse filter log hiding, add patrolling support into a new file patch-hide_patrol.sql 2009-06-06 22:34:51 +00:00
Andrew Garrett 14b850f891 Implementation of global filters, including a major i18n change for abusefilter-log-detailedentry message (rename and split). Needs further testing before deployment 2009-03-30 06:12:12 +00:00
Greg Sabino Mullane 1affe9e074 Modified version of patch from Brad Jorsch, updates Postgres schema to match MySQL, bug 18076 2009-03-23 14:18:35 +00:00
Brion Vibber 309e975f13 newlines at ends of files are nice :)
also added a /*_*/ where it was missing in one of the patches
2009-01-27 19:04:17 +00:00
Andrew Garrett 0f1eb8db78 SCHEMA CHANGE:
For MySQL 4.0 compatibility, store a summary of actions in the abuse_filter table.
While I'm there, make the pseudo-internal names for actions localisable and therefore actually make sense to the average user.
2009-01-27 18:32:17 +00:00
Andrew Garrett 412bfe0abe Respect DB table prefixes. 2009-01-27 01:37:41 +00:00
Andrew Garrett c97a1240e8 DB patch for schema change in previous revision. 2009-01-26 22:32:11 +00:00
Andrew Garrett 594c3d2a9a SVN ADD 2008-09-05 14:42:29 +00:00
Andrew Garrett 967fc54413 Add db patch for last commit 2008-08-03 14:05:16 +00:00