Add `auto_canceled_by_partition_id` to `p_ci_builds`
We have a reference from p_ci_builds
to the pipeline that canceled the job:
"fk_a2141b1522" FOREIGN KEY (auto_canceled_by_id) REFERENCES ci_pipelines(id) ON DELETE SET NULL
The pipeline that cancels a running job is not guaranteed to be in the same partition as the job, so we need to add a new column to p_ci_builds
to keep the foreign key to ci_pipelines
.
Proposal
- add
auto_canceled_by_partition_id, bigint, not null, default 100
top_ci_builds
- update the application code to set the value instead of relying on the database default
- remove the database default