Add foreign key for projects.namespace_id

The following discussion from gitlab-ce!13598 should be addressed:

  • @yorickpeterse started a discussion: (+1 comment)

    I don't remember if a foreign key is already present, but as long as projects.namespace_id doesn't have one (in particular with ON DELETE CASCADE) this problem will keep happening. If no foreign key is present we should add one as soon as possible.

See also https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/foreign_keys.md

Edited Jun 26, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading