Prepares federated sign-in, by which a user signs in here with their account on another gerbeur instance, and the other way round. It adds the instance's signing key, the link from a local account to the one it stands for elsewhere, the instances an admin trusts or blocks, the state of the sign-ins in progress on both sides, the grants users gave other instances, and the events owed to them.
/authorize and /federation/callback become pages, so their first
segments are reserved.
An account from another instance has no password here: its password_hash
is '', which no password verifies. Emails stay unique among local accounts
only, since the same person may also have a local account, or come from two
instances, with one address.
Run once by runMigrations. Nothing exists to convert, since every account
so far is local, but authorize and federation become the pages of a
sign-in, so a category that had one as its slug is renamed.
Usage
import * as mod from "api/db/migrations/0024_federation.ts";