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