Skip to content

Improve add_concurrent_foreign_key to support custom target column

Krasimir Angelov requested to merge 288005-custom-target-column-for-fk into master

What does this MR do?

So far the add_concurrent_foreign_key migration helper supports only FKs targeting id column. This updates the helper so that custom column can be specified. This will be helpful when swapping columns for PK conversion.

This was extracted from !64779 (merged) - since we decided to delay finalizing the PK conversion for 14.2, we can't merge !64779 (merged) now, but we want to prepare MRs for the other tables, and they need the updated add_concurrent_foreign_key helper.

Related to #288005 (closed).

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Related to #288005 (closed)

Merge request reports

Loading