// Fix-up: Sharkey versions in early-mid 2025 could federate with HTTP URLs, which would produce a user with no matching instance.
// These users are fundamentally broken and can just be removed, which ensures that the FK can create without conflicts.
// But we must also *preserve* those with a matching registered instance, as FireFish allowed federation over HTTP and some older instances may have fully-populated users.
awaitqueryRunner.query(`DELETE FROM "user" WHERE "uri" LIKE 'http:%' AND NOT EXISTS (select 1 from "instance" where "instance"."host" = "user"."host")`);