Loading
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 TIMESTAMPTZtooauth_refresh_tokenswith migrations for both backends. GetRefreshTokennow selects the column for sqlc model alignment.- Native IAM paths leave
revoked_atNULL —activeremains 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.