Skip to content

Commit

Permalink
Merge pull request #2293 from DFE-Digital/rails-erd
Browse files Browse the repository at this point in the history
Entity-relationship diagram
  • Loading branch information
thomasleese authored Jul 9, 2024
2 parents ebf1668 + 9b3fa90 commit 64efb9d
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 1 deletion.
10 changes: 10 additions & 0 deletions .erdconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
filename: docs/diagram

attributes:
- content
- foreign_keys
- inheritance

exclude:
- ActiveRecord::InternalMetadata
- ActiveRecord::SchemaMigration
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ group :development, :test do
end

group :development do
gem "rails-erd"
gem "rladr"
gem "web-console"

Expand Down
9 changes: 9 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ GEM
regexp_parser (>= 1.5, < 3.0)
xpath (~> 3.2)
cgi (0.4.1)
choice (0.2.0)
climate_control (1.2.0)
combine_pdf (1.0.26)
matrix
Expand Down Expand Up @@ -428,6 +429,11 @@ GEM
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
rails-erd (1.7.2)
activerecord (>= 4.2)
activesupport (>= 4.2)
choice (~> 0.2.0)
ruby-graphviz (~> 1.2)
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
Expand Down Expand Up @@ -522,6 +528,8 @@ GEM
rubocop (~> 1.0)
rubocop-rspec (3.0.1)
rubocop (~> 1.61)
ruby-graphviz (1.2.5)
rexml
ruby-progressbar (1.13.0)
ruby-rc4 (0.1.5)
ruby-vips (2.2.1)
Expand Down Expand Up @@ -667,6 +675,7 @@ DEPENDENCIES
pundit
rack-attack
rails (= 7.1.3.4)
rails-erd
rails_semantic_logger
rladr
rmagick
Expand Down
2 changes: 1 addition & 1 deletion db/schema.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added docs/diagram.pdf
Binary file not shown.
3 changes: 3 additions & 0 deletions lib/tasks/auto_generate_erd.rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# frozen_string_literal: true

RailsERD.load_tasks if Rails.env.development?

0 comments on commit 64efb9d

Please sign in to comment.