Repairs the rows 0011 got wrong. 0011 took any path containing "favicon", or ending in .svg, for an icon, so artwork such as /wp-content/uploads/2022/04/mir-logo-favicon.png lost its thumbnailUrl, and its dump showed as a pull-quote instead of an image in the journal mosaic.

This rule judges the file name and its folder instead. It spares mir-logo-favicon.png and catches icon_SEARCH.png, which 0011 missed.

Functions

f
up(db: DatabaseSync): void

Run once by runMigrations. It moves a faviconUrl back to thumbnailUrl only when 0011's rule takes it for an icon and this one doesn't. That also catches the ones a later fetch stored that this rule doesn't recognise, such as a logo.svg. It then moves the icons 0011 missed.

Usage

import * as mod from "api/db/migrations/0012_fix_favicon_reclassification.ts";