Skip to content

Draft: Move database helper to dedicated modules

Max Orefice requested to merge morefice/add-migration-constraints-helper into master

What does this MR do and why?

This MR proposes to split migration helpers in dedicated modules and introduces the following:

  • Gitlab::Database::Migrations::ConstraintsHelpers
  • Gitlab::Database::Migrations::TimeoutHelpers
  • Gitlab::Database::Migrations::LockRetriesHelpers

We are only moving files around, all features remain untouched.

Why are we doing this?

migration_helpers.rb has 1734 lines and a lot of helpful methods used by developers to write migrations.

This MR proposes to split the responsibility between different migration helpers which are still included within our main migration helper.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Max Orefice

Merge request reports