Re-run background migration to add admin_mode scope for PATs
In !107875 (merged), we added a background migration to add admin_mode
scope for PATs. However, there were issues reported with this background migration in #388935.
We store token scopes as strings. The problem is caused by that in the documentation, we recommended creating token scopes as symbols.
The existing background migration cannot handle scopes as symbols:
> token.scopes
=> "---\n- :read_api\n"
> YAML.safe_load(token.scopes)
=> Psych::DisallowedClass: Tried to load unspecified class: Symbol
Proposal
As described in https://docs.gitlab.com/ee/development/database/batched_background_migrations.html#requeuing-batched-background-migrations:
- turn the original queuing into a no-op by clearing up the #up and #down
- requeue the fixed migration
Edited by Imre Farkas