Add a fix script to populate the mod_actions subject field by parsing mod action descriptions. Most mod actions contain an ID, so finding the subject is easy, but some don't. And some mod actions refer to deleted objects, such as deleted posts or comments. In these cases the subject will be null. For IP bans, the mod action description only contains the IP, but it's possible to have multiple bans for the same IP. So we look for IP bans created by the same user, for the same IP, within the same time range. For user bans, the mod action only contains the banned user's name and the ban reason. This makes it difficult to find the banned user's ID in some cases, because it's possible for the user to have changed their name, and for the name change to have not been recorded, and for the banner to have edited the ban reason, or for the ban to have been deleted. So we try multiple things until we find the closest match.
Fixes
This directory contains one-off scripts designed to fix various problems with the production database. Most of these scripts are for the production database and aren't meant to be run by downstream users.
Most of the older scripts here no longer work because of changes to the code over the years.