--- clients-online


ALTER TABLE clients
  ADD online BOOLEAN NOT NULL DEFAULT FALSE,
  ADD last_seen_at TIMESTAMPTZ;

CREATE INDEX clients_online_last_seen_at
  ON clients (last_seen_at)
  WHERE online IS TRUE;
