Foreign keys with on_delete: restrict also need an index

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

  • Close this issue

In addition to what is documented in https://docs.gitlab.com/ee/development/migration_style_guide.html#adding-foreign-key-constraints, it is worth to point out that foreign keys with on_delete: restrict also need an index.

This issue is about enhancing the documentation to clarify this and reviewing corresponding rubocop rules.

Edited Sep 13, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading