CREATE TABLE IF NOT EXISTS ohm_stats ( time TIMESTAMPTZ NOT NULL, host TEXT, hardware TEXT, hardware_type TEXT, identifier TEXT, sensor TEXT, sensor_type TEXT, sensor_index INT, value REAL ); SELECT create_hypertable('ohm_stats', 'time', if_not_exists => TRUE); CREATE INDEX IF NOT EXISTS idx_ohm_host ON ohm_stats (host); CREATE INDEX IF NOT EXISTS idx_ohm_identifier ON ohm_stats (identifier);