mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-15 02:03:53 +00:00
01f699ff07
The method is used to make afl_deleted = null treated as afl_deleted = 0. Digging into code history, I found that it's in place because: *In rEABF14b850f891de27ea09a1439e3835f66c49ad773f the afl_deleted field was introduced as NULL, and wasn't used. *In rEABFfe39e38282fc4c7903eb3f8080dbf0bab0f697f4 it was ALTERed to be "NOT NULL DEFAULT 0" *And in rEABFa2ead8bfb5166e0b354f3bb3e09f39795cb5b1c0 this function was introduced to "negate the need for a schema change". However, when ALTERing afl_deleted to be NOT NULL DEFAULT 0, all NULL values have been automatically converted to 0 thanks to the DEFAULT clause, and being the column NOT NULL, of course no NULL are still there... The ALTER was applied to all wikis (in 2010), so afl_deleted is NOT NULL everywhere and we can safely treat it as such. Change-Id: Iebd843629d26e392d2e24efc2795c767e854897a |
||
---|---|---|
.. | ||
ApiAbuseFilterCheckMatch.php | ||
ApiAbuseFilterCheckSyntax.php | ||
ApiAbuseFilterEvalExpression.php | ||
ApiAbuseFilterUnblockAutopromote.php | ||
ApiQueryAbuseFilters.php | ||
ApiQueryAbuseLog.php |