Replace project_daily_statistics_table with partitions

What does this MR do and why?

Related to: #561245 (closed)

Replaces the project_daily_statistics table with its partitioned version(project_daily_statistics_b8088ecbd2).

This is the 5/6 step in partitioning the project_daily_statistics table. The background migration to backfill the partitioned table(project_daily_statistics_b8088ecbd2) was finalized in !207226 (merged) and has completed successfully (Status: finalised, Progress: 100%).

After the swap:

`project_daily_statistics` --> `project_daily_statistics_archived`,

`project_daily_statistics_b8088ecbd2` --> `project_daily_statistics`
The screenshot of the job status

Screenshot_2025-11-10_at_8.52.54_pm

Reference: While working on the table swap, I referenced the Replace ci_runner_machines MR with partitioned table and encountered the LFK concept. Since project_daily_statistics is in the gitlab_main_org schema and only references tables within the same database, no Loose Foreign Key updates are needed for this table swap.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Emma Park

Merge request reports

Loading