Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Init support for entity-relationship diagram creation (Ruby ERD) #697

Merged
merged 1 commit into from
Oct 4, 2024

Conversation

Splines
Copy link
Member

@Splines Splines commented Oct 3, 2024

Entity-relationship diagrams (ERD) have long been a very powerful tool for gaining insights and an overview of how the tables in a database are structured and associated to each other.

Rails ERD generates such diagrams based on runtime-informations using reflection (instead of static analysis). We have already specified this dependency in our Gemfile, but not used it so far.

Tip

In order to generate the PDF files locally, see the new Wiki entry here.

For reviewers

  • Merge the voucher PR Vouchers for user promotion - Part 2: Redemption #671 into this branch locally to be able to create the voucher-related ERDs. Otherwise you will encounter errors like raise NameError.new(message, name).
  • Please make sure to rebuild at least the mampf dev docker container, as graphviz was added as dependency. This is a visualization library that Rails ERD uses to generate the actual PDF out of .dot files. We need to make sure it is available in the dev docker container.
  • I've created some diagrams that I think could be useful as a good starting point. We can easily add more later on if needed. But feel free to add more diagrams directly in this pull request ;)

Sample output

image

@Splines Splines self-assigned this Oct 3, 2024
@Splines Splines added the dependencies Pull requests that update a dependency file label Oct 3, 2024
Copy link

codecov bot commented Oct 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 54.45%. Comparing base (76e3329) to head (8cb3c43).
Report is 1 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev     #697   +/-   ##
=======================================
  Coverage   54.45%   54.45%           
=======================================
  Files         160      160           
  Lines        6752     6752           
=======================================
  Hits         3677     3677           
  Misses       3075     3075           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@fosterfarrell9 fosterfarrell9 self-requested a review October 4, 2024 16:47
Copy link
Collaborator

@fosterfarrell9 fosterfarrell9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice! LGTM.

@Splines Splines merged commit af47a3f into dev Oct 4, 2024
5 checks passed
@Splines Splines deleted the feature/erd branch October 4, 2024 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants