From 7e047d9e340bc284919253a88d77e994ecbc1101 Mon Sep 17 00:00:00 2001 From: Owen Date: Sat, 20 Dec 2025 15:40:11 -0500 Subject: [PATCH] db schema for maintenance --- server/db/sqlite/schema/schema.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/server/db/sqlite/schema/schema.ts b/server/db/sqlite/schema/schema.ts index e9f81b17..1725e5d3 100644 --- a/server/db/sqlite/schema/schema.ts +++ b/server/db/sqlite/schema/schema.ts @@ -147,10 +147,19 @@ export const resources = sqliteTable("resources", { onDelete: "set null" }), headers: text("headers"), // comma-separated list of headers to add to the request - proxyProtocol: integer("proxyProtocol", { mode: "boolean" }) + proxyProtocol: integer("proxyProtocol", { mode: "boolean" }).notNull().default(false), + proxyProtocolVersion: integer("proxyProtocolVersion").default(1), + + maintenanceModeEnabled: integer("maintenanceModeEnabled", { mode: "boolean" }) .notNull() .default(false), - proxyProtocolVersion: integer("proxyProtocolVersion").default(1) + maintenanceModeType: text("maintenanceModeType", { + enum: ["forced", "automatic"] + }).default("forced"), // "forced" = always show, "automatic" = only when down + maintenanceTitle: text("maintenanceTitle"), + maintenanceMessage: text("maintenanceMessage"), + maintenanceEstimatedTime: text("maintenanceEstimatedTime"), + }); export const targets = sqliteTable("targets", {