Skip to content

Add the `schema_name` field to the dictionary files

What does this MR do and why?

Add the schema_name field to the dictionary files.

I have used the following script to populate the dictionary files:

gitlab_schemas_path = "/Users/diogo/gitlab-development-kit/gitlab/lib/gitlab/database/gitlab_schemas.yml"
dic_path = "/Users/diogo/gitlab-development-kit/gitlab/db/docs/"
file_names = Dir.entries(dic_path)
gitlab_schemas = YAML.load_file gitlab_schemas_path

file_names.each do |file_name|
  next unless file_name.include? ".yml"

  table_name = file_name.gsub(".yml", "")

  gitlab_schema = gitlab_schemas[table_name]

  file_path = dic_path + file_name
  data = YAML.load_file file_path
  data["gitlab_schema"] = gitlab_schema
  File.open(file_path, 'w') { |f| YAML.dump(data, f) } 
end

More info: 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