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
- Get database schema dump (might be easier to do using
gitlab-rake db:structure:dump
from #28591?) for a number of on prem installations - Compare equivalency with
structure.sql
for version of GitLab that they are currently running - 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