feat(oauth): add revoked_at to oauth_refresh_tokens

Why

Refresh-token replication (gitlab-org/gitlab#629565 (closed)) carries Doorkeeper's revoked_at on the wire, but oauth_refresh_tokens stores only active, discarding timestamps that become unrecoverable when Rails prunes the source row. Agreed in the issue discussion, it enables Layer 4 reconciliation with timestamp diffs.

What

  • Adds nullable revoked_at TIMESTAMPTZ to oauth_refresh_tokens with migrations for both backends.
  • GetRefreshToken now selects the column for sqlc model alignment.
  • Native IAM paths leave revoked_at NULL — active remains the enforcement flag; rotation and reactivation do not manage this column.
  • Replication Upsert (!699 (closed)) populates it; this MR merges first.

Verification

Build, unit tests, sqlc regenerated and committed, and the auth/oauth/server integration suites green on Postgres and YugabyteDB.

🤖 Generated with Claude Code

Merge request reports

Loading
Loading