Cells: Iteration 2: Convert all foreign keys to loose between `user` and `namespaces`

Problem

While doing #390102 (closed) we need to remove foreign keys between users and namespaces since they will be in different databases.

According to !108462 (closed), there's currently a single FK to be removed:

ALTER TABLE ONLY users
    ADD CONSTRAINT fk_a4b8fefe3e FOREIGN KEY (managing_group_id) REFERENCES namespaces(id) ON DELETE SET NULL;

Steps

  1. From db/gitlab_schemas/gitlab_main_cell.yaml
  2. Remove: allow_cross_foreign_keys: gitlab_main_clusterwide allow.
  3. Get pipeline green.

Proposal

In &8518, we discovered the related feature is removed, so it's safe to simply remove the FK.

Edited Aug 02, 2023 by Thong Kuah
Assignee Loading
Time tracking Loading