Stops older dumps from showing a site's icon as their thumbnail. The metadata fetch used to fall back on the page's icon, and then on a guessed /favicon.ico, so most thumbnails were a 16×16 icon, or a 404, that the UI stretched over a 128×72 box. It now stops at real artwork, and a missing thumbnailUrl means none, which the frontend draws a placeholder for. This gives the older rows that meaning, by moving their icons out of rich_content.thumbnailUrl into the new faviconUrl.

It judges the stored URL alone and fetches nothing, so it doesn't fill accentColor. The frontend derives a hue from the hostname when it is missing, and refreshing a dump's metadata fetches the real one.

Functions

f
up(db: DatabaseSync): void

Run once by runMigrations. It leaves alone a row that already has a faviconUrl, and one whose rich_content doesn't parse. 0012 undoes its mistakes.

Usage

import * as mod from "api/db/migrations/0011_split_favicon_thumbnail.ts";