Skip to content

Use database dictionary to fetch gitlab schemas

What does this MR do and why?

We are deprecating the gitlab_schemas.yml file. In order to remove the gitlab_schemas.yml file, we have to fetch the gitlab_schema from the database dictionary. The gitlab_schema is a required field in the database dictionary.

Note:

The following classes are using .tables_to_schema:

https://gitlab.com/gitlab-org/gitlab/-/blame/cb909fb15cbc4d337b8c8ecae60c0048cacc1391/lib/gitlab/database/tables_truncate.rb#L23

https://gitlab.com/gitlab-org/gitlab/-/blame/cb909fb15cbc4d337b8c8ecae60c0048cacc1391/lib/tasks/gitlab/db/lock_writes.rake#L9

https://gitlab.com/gitlab-org/gitlab/-/blame/cb909fb15cbc4d337b8c8ecae60c0048cacc1391/spec/lib/gitlab/usage/service_ping_report_spec.rb#L115

I think we don't need to return views as well.

Issue: gitlab-org/database-team/team-tasks#260 (closed)

Screenshots or screen recordings

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

How to set up and validate locally

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

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Diogo Frazão

Merge request reports

Loading