Backfill web_hook_logs_daily
Ref: #507318
What does this MR do and why?
This MR backfills our new web_hook_logs_daily
partitioned table.
It uses the new cursor batched background migration as we are dealing with a composite PK from an existing partitioned table.
This migration will only be executed for self-managed as we already have the necessary data since adding the trigger in #507316 (closed).
Testing
Run the migration, verify it was enqueued successfully and revert it to make sure everything is back to normal.
bin/rails db:migrate:up:main VERSION=20250109154733
gdk psql -c "select * from batched_background_migrations order by id desc limit 1;" -d "gitlabhq_development"
bin/rails db:migrate:down:main VERSION=20250109154733
gdk psql -c "select * from batched_background_migrations order by id desc limit 1;" -d "gitlabhq_development"
Edited by Max Orefice