ALTER TABLE sessions
  ADD COLUMN IF NOT EXISTS previous_refresh_token_hash TEXT;

CREATE INDEX IF NOT EXISTS idx_sessions_prev_rt_hash
  ON sessions (previous_refresh_token_hash)
  WHERE previous_refresh_token_hash IS NOT NULL;
