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: destroy with on_delete: :cascade
  • Create index on group_id for use in on_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: :destroy in EE:User for similar models, should I do the same here instead of the { on_delete: :cascade }?
Edited by 🤖 GitLab Bot 🤖