refactor: ♻️ Store instance federation protocol in database, refactor fetcher

This commit is contained in:
Jesse Wierzbinski 2024-06-29 20:58:39 -10:00
parent 6dc51ab323
commit f2b0de779b
No known key found for this signature in database
10 changed files with 2515 additions and 73 deletions

View file

@ -0,0 +1,2 @@
ALTER TABLE "Challenges" ALTER COLUMN "expires_at" SET NOT NULL;--> statement-breakpoint
ALTER TABLE "Instances" ADD COLUMN "protocol" text DEFAULT 'lysand' NOT NULL;

File diff suppressed because it is too large Load diff

View file

@ -197,6 +197,13 @@
"when": 1718327596823,
"tag": "0027_peaceful_whistler",
"breakpoints": true
},
{
"idx": 28,
"version": "7",
"when": 1719726234826,
"tag": "0028_unique_fat_cobra",
"breakpoints": true
}
]
}

View file

@ -348,6 +348,10 @@ export const Instances = pgTable("Instances", {
disableAutomoderation: boolean("disable_automoderation")
.default(false)
.notNull(),
protocol: text("protocol")
.notNull()
.$type<"lysand" | "activitypub">()
.default("lysand"),
});
export const OpenIdAccounts = pgTable("OpenIdAccounts", {