Skip to content

Generate new db doc file with fake gitlab_schema

Problem statement / Reproduction

  1. Create a table in a branch. Run db migrations.
  2. Switch to another branch. Run db migrations again. The tables added from step 1 now appear as new db/doc files. GDK fails with Gitlab::Database::GitlabSchema::UnknownSchemaError

What does this MR do and why?

Generate new db doc file with fake gitlab_schema

This improves developer experience by not causing Gitlab::Database::GitlabSchema::UnknownSchemaError error when visiting a page in development mode.

Specs in spec/lib/gitlab/database/gitlab_schema_spec.rb will still fail if an incorrect gitlab_schema value is provided.

References

Screenshots or screen recordings

Before After

How to set up and validate locally

MR acceptance checklist

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

Edited by Thong Kuah

Merge request reports

Loading