Add and backfill project_id for deployment_clusters
What does this MR do and why?
Add and backfill project_id for deployment_clusters.
This table has a desired sharding key configured (view configuration).
This merge request is the first step towards transforming the desired sharding key into a sharding key.
This involves three changes:
- Adding a new column that will serve as the sharding key (along with the relevant index and foreign key).
- Populating the sharding key when new records are created by adding a database function and trigger.
- Scheduling a batched background migration to set the sharding key for existing records.
Once the background migration has completed, a second merge request will be created to finalize the background migration and add a not null constraint.
Edited by Tiger Watson