Improve how database configurations and gitlab schemas are stored
Problem
We are adding more gitlab_schemas
and more database connections. This makes us to explode lib/gitlab/database.rb
with overrides,
and quirks of behavior.
It should be better to store all those as YAML that clearly describes each configuration behavior for DB and gitlab_schema
.
db/database_configurations/*.yaml
name: main
description: Main GitLab database holding all projects, issues, etc.
gitlab_schemas:
- gitlab_internal
- gitlab_shared
- gitlab_main
- gitlab_pm
klass: ActiveRecord::Base
uses_load_balancing: true
db/gitlab_schemas/*.yaml
name: gitlab_main
description: Schema for all Cell-local tables, ex. projects, issues, etc.