Skip to content

Address database schema differences between on prem installations and structure.sql

Problem Statement

A number of on prem installations do not have the equivelent schema as reflected in https://gitlab.com/gitlab-org/gitlab/-/blob/master/db/structure.sql. This is especially true for instances that migrated from MySQL to PostgreSQL especially ones that used older versions of migration directions (before pgLoader was used e.g. https://gitlab.com/gitlab-org/gitlab/-/blob/8-0-stable-ee/doc/update/mysql_to_postgresql.md).

Proposal

  1. Get database schema dump (might be easier to do using gitlab-rake db:structure:dump from #28591 (closed)?) for a number of on prem installations
  2. Compare equivalency with structure.sql for version of GitLab that they are currently running
  3. Correct differences via database migrations such that schema can be counted on being accurate in more cases

What happens if this isn't addressed

Not addressing this will result in continued issues like:

Edited by Ben Bodenmiller