Add not valid foreign key to namespaces.parent_id
What does this MR do and why?
This is to add a foreign key to namespaces.parent_id
.
Following the https://docs.gitlab.com/ee/development/database/add_foreign_key_to_existing_column.html, we're:
- adding an invalid FK (current MR),
- add a data migration, to fix or clean up existing records (Draft: Set `parent_id` to nil on namespaces who... (!153101)),
- validate the whole table by making the foreign key VALID (follow-up MR).
Add not valid foreign key to namespaces.parent_id
Adds a not valid foreign key to namespaces.parent_id
.
See https://docs.gitlab.com/ee/development/database/add_foreign_key_to_existing_column.html
Changelog: added
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
N/A
How to set up and validate locally
N/A
Edited by Bojan Marjanovic