Cells: Iteration 2: Convert FK between `users` and `members`
Once we do Cells: Iteration 2: Make `namespaces` to be `gi... (#390102 - closed) this will define a root table for users (located in Cluster) and members (located on Cell).
The Cells: Iteration 2: Record all queries performe... (#404762 - closed) does identify all other tables that are touched as part of User can create Group.
We need to:
- Assign each of those tables accordingly to
gitlab_schema, and in case of cluster models change it'sMainClusterwide::AplicationRecordbase class - Identify
cross-joinssimilar to Cells: Iteration 2: Ignore cross-joins, cross-d... (#409840 - closed), create issues, fix one related toUser can create Group - Convert foreign keys crossing
gitlab_main_clusterwideandgitlab_main_cellas done in Cells: Iteration 2: Convert all foreign keys to... (#409837 - closed)
It is likely this constraint that needs to converted:
ADD CONSTRAINT fk_2e88fb7ce9 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
Proposal
Convert fk_2e88fb7ce9 constraint to a loose foreign key. That way when record is deleted on users, we cascade the delete to members still
Edited by Thong Kuah