Page MenuHomePhabricator

Add a default value for afl_ip
Closed, ResolvedPublic

Description

Summary

To implement T400284: Stop writing to `afl_ip`, we need to give afl_ip column a default value in the database definition

Background & Technical notes

  • As part of T395612: AbuseFilter abuse_filter_log table: Store IP addresses as hex values, we are removing the afl_ip column from the abuse_filter_log table as it duplicates the new afl_ip_hex column
  • To be able to implement T400284: Stop writing to `afl_ip`, we need to be able to stop writing any value to afl_ip
    • However, the column is defined as having no default value which means that we can't yet not define anything as it's value
    • Therefore, we first need to assign a default to afl_ip so that we can stop writing to it once the change is deployed
  • While doing this, we should consider removing the default for afl_ip_hex as we expect that all code should write to this column

Acceptance criteria

  • The afl_ip column for the abuse_filter_log table has a default value of an empty string
  • The afl_ip_hex column for the abuse_filter_log table has no default value

Event Timeline

Change #1178495 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/AbuseFilter@master] Remove default value from afl_ip in abuse_filter_log table

https://gerrit.wikimedia.org/r/1178495

Change #1178496 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/AbuseFilter@master] Remove the default for afl_ip_hex in the abuse_filter_log table

https://gerrit.wikimedia.org/r/1178496

Change #1178495 merged by jenkins-bot:

[mediawiki/extensions/AbuseFilter@master] Set default value for afl_ip in abuse_filter_log table

https://gerrit.wikimedia.org/r/1178495

Change #1178496 merged by jenkins-bot:

[mediawiki/extensions/AbuseFilter@master] Remove the default for afl_ip_hex in the abuse_filter_log table

https://gerrit.wikimedia.org/r/1178496