Move endpoint to per site

This commit is contained in:
Owen 2025-08-04 20:17:35 -07:00
parent d1404a2b07
commit 1a9de1e5c5
No known key found for this signature in database
GPG key ID: 8271FDFFD9E0CCBD
7 changed files with 208 additions and 108 deletions

View file

@ -216,7 +216,7 @@ export const clients = sqliteTable("clients", {
lastPing: text("lastPing"),
type: text("type").notNull(), // "olm"
online: integer("online", { mode: "boolean" }).notNull().default(false),
endpoint: text("endpoint"),
// endpoint: text("endpoint"),
lastHolePunch: integer("lastHolePunch")
});
@ -227,7 +227,8 @@ export const clientSites = sqliteTable("clientSites", {
siteId: integer("siteId")
.notNull()
.references(() => sites.siteId, { onDelete: "cascade" }),
isRelayed: integer("isRelayed", { mode: "boolean" }).notNull().default(false)
isRelayed: integer("isRelayed", { mode: "boolean" }).notNull().default(false),
endpoint: text("endpoint")
});
export const olms = sqliteTable("olms", {