-- Online user count snapshots
-- Recorded every minute for historical trend analysis
CREATE TABLE IF NOT EXISTS online_snapshots (
    id BIGSERIAL PRIMARY KEY,
    ts TIMESTAMPTZ NOT NULL UNIQUE,
    online_count INT NOT NULL DEFAULT 0,
    window_seconds INT NOT NULL DEFAULT 180
);

CREATE INDEX idx_online_snapshots_ts ON online_snapshots(ts DESC);
