Files
danbooru/script/fixes
evazion 3dc765ca9d mod actions: add fix script to populate subject field.
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.
2022-09-25 21:19:43 -05:00
..
2013-02-22 20:59:21 -05:00
2013-02-22 21:13:11 -05:00
2013-02-23 19:46:32 -05:00
2019-12-22 21:23:37 -06:00
2019-12-22 21:23:37 -06:00
2019-12-22 21:23:37 -06:00
2019-12-22 21:23:37 -06:00
2019-12-22 21:23:37 -06:00
2019-12-22 21:23:37 -06:00
2019-12-22 21:23:37 -06:00
2019-12-22 21:23:37 -06:00
2019-12-22 21:23:37 -06:00
2019-12-22 21:23:37 -06:00
2019-12-22 21:23:37 -06:00

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.