Skip to content

Add Migration::ConstraintsHelpers

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

What does this MR do and why?

This the last step of !101258 (closed)

This MR splits constraints methods in dedicated module and introduces the following:

  • Gitlab::Database::Migrations::ConstraintsHelpers

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.

This was discussed and validated with the database team.

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