--- users-last-seen


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

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