--- users-last-seen


ALTER TABLE users
  ADD last_seen_at DATETIMEOFFSET;
ALTER TABLE users
  ADD online BIT NOT NULL DEFAULT 0;

CREATE INDEX users_online_last_seen_at_ix
  ON users (last_seen_at DESC)
  WHERE online = 1;
