Update AccessLevel tables: (remove timestamps, create index on group_id and use on_delete: :cascade instead of dependent: :destroy)
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
What
The tables for protected tag/branch push/merge/create access levels need a few improvements:
- Remove unused timestamps
- Replace use of
dependent: destroywithon_delete: :cascade - Create index on
group_idfor use inon_delete: :cascasde
Original discussion
The following discussion from !5103 (merged) should be addressed:
-
@jamedjo started a discussion: (+5 comments) @yorickpeterse Two questions:
- Is an index needed for the
{ on_delete: :cascade }? - We use
dependent: :destroyinEE:Userfor similar models, should I do the same here instead of the{ on_delete: :cascade }?
- Is an index needed for the
Edited by 🤖 GitLab Bot 🤖