--- clients-online

ALTER TABLE clients
  ADD online BIT NOT NULL DEFAULT 0;

ALTER TABLE clients
  ADD last_seen_at DATETIMEOFFSET;

CREATE INDEX clients_online_last_seen_at
  ON clients (last_seen_at)
  WHERE online = 1;
