diff --git a/server/db/pg/schema/schema.ts b/server/db/pg/schema/schema.ts index 473d0f852..7fbcef621 100644 --- a/server/db/pg/schema/schema.ts +++ b/server/db/pg/schema/schema.ts @@ -158,7 +158,7 @@ export const resources = pgTable("resources", { maintenanceMessage: text("maintenanceMessage"), maintenanceEstimatedTime: text("maintenanceEstimatedTime"), postAuthPath: text("postAuthPath"), - health: varchar("health"), // "healthy", "unhealthy" + health: varchar("health").default("unknown"), // "healthy", "unhealthy", "unknown" wildcard: boolean("wildcard").notNull().default(false) }); diff --git a/server/db/sqlite/schema/schema.ts b/server/db/sqlite/schema/schema.ts index 6a24ac8dd..423190420 100644 --- a/server/db/sqlite/schema/schema.ts +++ b/server/db/sqlite/schema/schema.ts @@ -179,7 +179,7 @@ export const resources = sqliteTable("resources", { maintenanceMessage: text("maintenanceMessage"), maintenanceEstimatedTime: text("maintenanceEstimatedTime"), postAuthPath: text("postAuthPath"), - health: text("health"), // "healthy", "unhealthy" + health: text("health").default("unknown"), // "healthy", "unhealthy", "unknown" wildcard: integer("wildcard", { mode: "boolean" }).notNull().default(false) }); diff --git a/server/setup/scriptsPg/1.18.0.ts b/server/setup/scriptsPg/1.18.0.ts index 8431a11c1..fe43112a2 100644 --- a/server/setup/scriptsPg/1.18.0.ts +++ b/server/setup/scriptsPg/1.18.0.ts @@ -347,7 +347,7 @@ export default async function migration() { `); await db.execute(sql` - ALTER TABLE "resources" ADD "health" varchar; + ALTER TABLE "resources" ADD "health" varchar DEFAULT 'unknown'; `); await db.execute(sql` diff --git a/server/setup/scriptsSqlite/1.18.0.ts b/server/setup/scriptsSqlite/1.18.0.ts index d34cf1541..aba817df1 100644 --- a/server/setup/scriptsSqlite/1.18.0.ts +++ b/server/setup/scriptsSqlite/1.18.0.ts @@ -332,7 +332,7 @@ export default async function migration() { ).run(); db.prepare( ` - ALTER TABLE 'resources' ADD 'health' text; + ALTER TABLE 'resources' ADD 'health' text DEFAULT 'unknown'; ` ).run(); db.prepare(