Skip to content

Draft: Add organization_users foreign keys

Alex Pooley requested to merge 444947-organization_users-foreign-keys into master

What does this MR do and why?

Retrospectively add foreign key constraints to the organization_users join table. Following the database guide.

In spec/support/helpers/test_env.rb the default organization is seeded into the test database. Without foreign key constraints specs would assign organization_id = 1 but the organization row never needed to exist. We used to have this line in the code base. This was previously removed in !121204 (merged) but needs to come back for now. Note that the default organization was seeded into production environments many milestones ago.

In qa/gdk/Dockerfile.gdk.dockerignore the default organization is seeded into the QA pipeline.

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.

Closes #444947 (closed)

Edited by Alex Pooley

Merge request reports