Move build's execution_configs into p_ci_job_definitions

Problem

The table p_ci_builds_execution_configs stores configuration of CI steps that users define under run job keyword. This information is deduplicated on a pipeline ID level:

CREATE TABLE p_ci_builds_execution_configs (
    id bigint NOT NULL,
    partition_id bigint NOT NULL,
    project_id bigint NOT NULL,
    pipeline_id bigint NOT NULL,
    run_steps jsonb DEFAULT '{}'::jsonb NOT NULL
)
PARTITION BY LIST (partition_id);

However, as of the writing of this issue, we are introducing p_ci_job_definitions table that will store the deduplicated job configurations in a more efficient way. Deduplication of prototypes is done by partition_id + project_id which is more efficient than ci_builds_execution_configs.

By storing the run configs in a separate table we are not effectively checksumming the job configuration because p_ci_job_definitions will contain the checksummed config excluding the run keyword. A better implementation of this domain concept would be to merge the 2 data into a single checksummed config.

Proposal

Migrate data from p_ci_builds_execution_configs into p_ci_job_definitions.config colum. This data will be stored in a more efficient way and by definition it should influence the checksum of the job config.

Then, drop p_ci_builds_execution_configs after migration. This will be done in Deprecate p_ci_builds_execution_configs in favo... (&19262)

Edited by Furkan Ayhan