Skip to content

Use correct gitlab_schema in gitlab-housekeeper finalize BG migration

What does this MR do and why?

Previously we were determining the gitlab_schema from the table_name. This is causing problems as we're migrating lots of tables to gitlab_main_cell. But the gitlab_schema must exactly match whatever schema was used to queue the batched background migration (see https://docs.gitlab.com/ee/development/database/batched_background_migrations.html#finalize-a-batched-background-migration ) . As such we've extracted this value from the migration record in the database which should always be the expected value.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

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

Before After

How to set up and validate locally

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

Merge request reports

Loading