Set the default to unknown

This commit is contained in:
Owen
2026-04-27 17:15:44 -07:00
parent 81a6fb8d00
commit f89b0a17ac
4 changed files with 4 additions and 4 deletions

View File

@@ -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)
});

View File

@@ -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)
});

View File

@@ -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`

View File

@@ -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(