Extract database (migration) helpers into a separate Gem

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

  • Close this issue

During today's NL coworking day, @DouweM stated he felt it would be useful to extract our database (migration) helpers (Gitlab::Database and such) to a Gem. He mentioned that a lot of organisations tend to run into the same problems, and all build their own solutions. I fully agree with this, we build a lot of cool things but they are not necessarily specific to GitLab, and there's no real reason to keep it that way.

So what I propose would be the following:

  1. All changes we made to Gitlab::Database::* are backported to CE first, so both EE and CE share the same code
  2. We move this code into a separate Gem, probably with some cleanups and what not
  3. We replace both the CE and EE code with this Gem, and any future changes go into the Gem. Custom extensions (e.g. code related to background migrations) will stay in our own codebase (only) for the time being.

Overall this shouldn't be too much work, as most of the Gitlab::Database code is fairly straightforward.

cc @smcgivern @rymai @rspeicher

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