From 8186a23cebffcb7c62179f5d6fcf44d5d762f681 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E6=A9=98?= Date: Sat, 2 May 2026 09:38:22 +0000 Subject: [PATCH] chore: remove unused schema and migrations --- .../migrations/0001_init.sql | 14 -------------- .../migrations/0002_add_http_probe.sql | 7 ------- senses/hermes-gateway-health/src/index.ts | 2 -- senses/hermes-gateway-health/src/schema.ts | 17 ----------------- 4 files changed, 40 deletions(-) delete mode 100644 senses/hermes-gateway-health/migrations/0001_init.sql delete mode 100644 senses/hermes-gateway-health/migrations/0002_add_http_probe.sql delete mode 100644 senses/hermes-gateway-health/src/schema.ts diff --git a/senses/hermes-gateway-health/migrations/0001_init.sql b/senses/hermes-gateway-health/migrations/0001_init.sql deleted file mode 100644 index 51ce31d..0000000 --- a/senses/hermes-gateway-health/migrations/0001_init.sql +++ /dev/null @@ -1,14 +0,0 @@ --- Migration: 0001_init --- Creates the hermes_gateway_health table for hermes-gateway-health sense. - -CREATE TABLE IF NOT EXISTS hermes_gateway_health ( - id INTEGER PRIMARY KEY AUTOINCREMENT, - ts INTEGER NOT NULL, - alive INTEGER NOT NULL, - main_pid INTEGER NOT NULL, - rss_bytes INTEGER NOT NULL, - cpu_percent REAL NOT NULL, - uptime_sec INTEGER NOT NULL, - active_sessions INTEGER NOT NULL, - child_process_count INTEGER NOT NULL -); diff --git a/senses/hermes-gateway-health/migrations/0002_add_http_probe.sql b/senses/hermes-gateway-health/migrations/0002_add_http_probe.sql deleted file mode 100644 index a5787b9..0000000 --- a/senses/hermes-gateway-health/migrations/0002_add_http_probe.sql +++ /dev/null @@ -1,7 +0,0 @@ --- Migration: 0002_add_http_probe --- HTTP reachability columns for hermes-gateway-health sense. - -ALTER TABLE hermes_gateway_health ADD COLUMN http_ok INTEGER NOT NULL DEFAULT 0; -ALTER TABLE hermes_gateway_health ADD COLUMN http_status_code INTEGER NOT NULL DEFAULT 0; -ALTER TABLE hermes_gateway_health ADD COLUMN http_latency_ms INTEGER NOT NULL DEFAULT 0; -ALTER TABLE hermes_gateway_health ADD COLUMN http_error TEXT NOT NULL DEFAULT ''; diff --git a/senses/hermes-gateway-health/src/index.ts b/senses/hermes-gateway-health/src/index.ts index a403e6e..bc570b8 100644 --- a/senses/hermes-gateway-health/src/index.ts +++ b/senses/hermes-gateway-health/src/index.ts @@ -1,6 +1,4 @@ import { execFile } from "node:child_process"; -export { hermesGatewayHealth as table } from "./schema.ts"; - /** Keep subprocess deadlines slightly under typical sense timeout (30s). */ const EXEC_TIMEOUT_MS = 25_000; diff --git a/senses/hermes-gateway-health/src/schema.ts b/senses/hermes-gateway-health/src/schema.ts deleted file mode 100644 index 1ca1ba0..0000000 --- a/senses/hermes-gateway-health/src/schema.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { integer, real, sqliteTable, text } from "drizzle-orm/sqlite-core"; - -export const hermesGatewayHealth = sqliteTable("hermes_gateway_health", { - id: integer("id").primaryKey({ autoIncrement: true }), - ts: integer("ts").notNull(), - alive: integer("alive").notNull(), - mainPid: integer("main_pid").notNull(), - rssBytes: integer("rss_bytes").notNull(), - cpuPercent: real("cpu_percent").notNull(), - uptimeSec: integer("uptime_sec").notNull(), - activeSessions: integer("active_sessions").notNull(), - childProcessCount: integer("child_process_count").notNull(), - httpOk: integer("http_ok").notNull(), - httpStatusCode: integer("http_status_code").notNull(), - httpLatencyMs: integer("http_latency_ms").notNull(), - httpError: text("http_error").notNull(), -});