Backfill existing workspaces with PATs
What does this MR do and why?
Draft: Backfill existing workspaces with PATs
Related to #423006 (closed)
Migration output
bin/rails db:migrate:up:main VERSION=20230909120000 RAILS_ENV=development
main: == [advisory_lock_connection] object_id: 226720, pg_backend_pid: 2760914
main: == 20230909120000 QueueBackfillWorkspacePersonalAccessToken: migrating ========
main: == 20230909120000 QueueBackfillWorkspacePersonalAccessToken: migrated (0.0494s)
main: == [advisory_lock_connection] object_id: 226720, pg_backend_pid: 2760914
$ bin/rails db:migrate:down:main VERSION=20230909120000 RAILS_ENV=development
main: == [advisory_lock_connection] object_id: 226780, pg_backend_pid: 2761250
main: == 20230909120000 QueueBackfillWorkspacePersonalAccessToken: reverting ========
main: == 20230909120000 QueueBackfillWorkspacePersonalAccessToken: reverted (0.0155s)
main: == [advisory_lock_connection] object_id: 226780, pg_backend_pid: 2761250
Query plans
We create each personal access token and update each workspace individually. We expect < 250 records on Gitlabdotcom and less on self managed.
How to set up and validate locally
See the spec to run the migrations
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Alper Akgun