GitLab database schema gitlab_dotcom diagram

Hey all,

Do you know where could I find db documentation for gitlab_dotcom schema, including:

  • primary keys and foreign keys;
  • relations between tables (so I see how the tables one table can be joined to);
  • relation types (1 to 1, 1 to many, etc).

Especially the last 2 topics I am missing, the first I’ve found it in structure.sql provided by GitLab.

Thank you,

1 Like

Want to raise up this question, cuz I’m looking for ERD too.

Unfortunately I was unable to find it. They provide a solution, it’s a ruby script that generates a pdf, but unfortunately (due to the very large number of objects) it’s unreadable.

What I did was to search in structure.sql the tables I was interested in and find their foreign and primary key constraints (they are also defined in structure.sql) and draw them manually in or smth similar, very tedious work.

Thank you @RaduDr for the answer! It’s a really pity that GitLab doesn’t provide full ERD or at least most useful tables relationships. Hope they at least thinking of this in the nearest future :slight_smile: