Skip to content

Add foreign key constraint to ci_pipeline_variables

Tianwen Chen requested to merge 412864-add-foreign-key-constraint into master

What does this MR do and why?

Add not valid foreign key constraint to ci_pipeline_variables.pipeline_id_convert_to_bigint

This is part of the ci_pipeline_variables.pipeline_id bigint conversion. As we need to replicate whatever is setup for ci_pipeline_variables.pipeline_id to ci_pipeline_variables.pipeline_id_convert_to_bigint, foreign key is one of them.

This is the first step to add foreign key constraint to an existing column, see https://docs.gitlab.com/ee/development/database/add_foreign_key_to_existing_column.html

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #412864 (closed)

Merge request reports