Transititioning the hc table and firing the alerts

This commit is contained in:
Owen
2026-04-15 17:46:04 -07:00
parent b169a872a7
commit a04e2a5e00
9 changed files with 139 additions and 47 deletions

View File

@@ -210,8 +210,11 @@ export const targetHealthCheck = sqliteTable("targetHealthCheck", {
autoIncrement: true
}),
targetId: integer("targetId")
.notNull()
.references(() => targets.targetId, { onDelete: "cascade" }),
orgId: text("orgId").references(() => orgs.orgId, {
onDelete: "cascade"
}),
name: text("name").notNull(),
hcEnabled: integer("hcEnabled", { mode: "boolean" })
.notNull()
.default(false),