https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/core/+/refs/heads/master/maintenance/tables.sql
ipblocks_restrictions
Note that:
`ir_type` is either 1 or 2, shown as `page` or `namespace` to ease understanding
`ir_value` can only be an int, meaning that it cannot hold the action as a string
Multiple rows for a single block with multiple restrictions
Proposed implementation:
ActionRestriction, like for namespace / page
type: 3
ir_value - constant mapping with string to int, more added by hook (for thanks)
ActionRestriction::ACTION_CREATE_VALUE => 1
ActionRestriction::ACTION_UPLOAD_VALUE => 2
run hook
ACTION_THANK_VALUE = 101
Hook requires that no values override existing mapping
Values 1-100 are reserved for core
+-----------+-----------+----------+
| ir_ipb_id | type | ir_value |
+-----------+-----------+----------+
| 9562223 | action | 1 |
| 9562223 | action | 2 |
| 9563237 | action | 101 |
+-----------+-----------+----------+
^ 1 block from creating and uploading, and another block from thanks