Synchronously validate foreign keys for organization_users
What does this MR do and why?
This is the final step of adding Foreign keys to organization_users table.
This MR is part of a few MR's that will replace the use of Loose Foreign Keys for organization_users table
| MR | Description |
|---|---|
| !169382 (merged) | Add Foreign Key for user_id (NOT VALID) |
| !180028 (merged) | Add Foreign Key for organization_id (NOT VALID) |
| !185937 (merged) | Delete invalid organization_users records |
| !194587 (merged) | Finalize the 'fix invalid records' job |
| !199541 (merged) | Async validate the forkeign keys |
| This MR | Drop the NOT VALID modifier |
On Gitlab.com, validation of the foreign key was successful. Using \d organization_users on postgres.ai shows this output, which is expected
Foreign-key constraints:
"fk_8471abad75" FOREIGN KEY (organization_id) REFERENCES organizations(id) ON DELETE RESTRICT
"fk_8d9b20725d" FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE
Related to #493506 (closed)
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Rutger Wessels