add rails-erd

This commit is contained in:
João Geonizeli
2022-07-20 23:03:28 -03:00
parent 5e0d3def6d
commit 284c17c84d
4 changed files with 66 additions and 0 deletions

3
.erdconfig Normal file
View File

@@ -0,0 +1,3 @@
title: Progress Test - Models
filetype: svg
warn: false

View File

@@ -43,6 +43,7 @@ end
group :development do
gem "annotate", "~> 3.2"
gem "rails-erd", "~> 1.7"
gem "web-console"
end

View File

@@ -86,6 +86,7 @@ GEM
bootsnap (1.12.0)
msgpack (~> 1.2)
builder (3.2.4)
choice (0.2.0)
concurrent-ruby (1.1.10)
crass (1.0.6)
debug (1.6.1)
@@ -227,6 +228,11 @@ GEM
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-erd (1.7.1)
activerecord (>= 4.2)
activesupport (>= 4.2)
choice (~> 0.2.0)
ruby-graphviz (~> 1.2)
rails-html-sanitizer (1.4.3)
loofah (~> 2.3)
railties (7.0.3.1)
@@ -247,6 +253,7 @@ GEM
responders (3.0.1)
actionpack (>= 5.0)
railties (>= 5.0)
rexml (3.2.5)
rspec-core (3.11.0)
rspec-support (~> 3.11.0)
rspec-expectations (3.11.0)
@@ -264,6 +271,8 @@ GEM
rspec-mocks (~> 3.10)
rspec-support (~> 3.10)
rspec-support (3.11.0)
ruby-graphviz (1.2.5)
rexml
ruby2_keywords (0.0.5)
sassc (2.4.0)
ffi (~> 1.9)
@@ -322,6 +331,7 @@ DEPENDENCIES
pg (~> 1.1)
puma (~> 5.0)
rails (~> 7.0.3, >= 7.0.3.1)
rails-erd (~> 1.7)
redis (~> 4.0)
rspec-rails (~> 5.1)
sassc-rails

52
erd.svg Normal file
View File

@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 4.0.0 (0)
-->
<!-- Title: ProgressTest Pages: 1 -->
<svg width="416pt" height="204pt"
viewBox="0.00 0.00 416.10 203.60" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(28.8 174.8)">
<title>ProgressTest</title>
<polygon fill="white" stroke="transparent" points="-28.8,28.8 -28.8,-174.8 387.3,-174.8 387.3,28.8 -28.8,28.8"/>
<text text-anchor="middle" x="179.25" y="-131.6" font-family="Arial Bold" font-size="13.00">Progress Test &#45; Models</text>
<!-- m_ActiveAdmin::Comment -->
<g id="node1" class="node">
<title>m_ActiveAdmin::Comment</title>
<path fill="none" stroke="black" d="M12,-0.5C12,-0.5 132,-0.5 132,-0.5 138,-0.5 144,-6.5 144,-12.5 144,-12.5 144,-96.5 144,-96.5 144,-102.5 138,-108.5 132,-108.5 132,-108.5 12,-108.5 12,-108.5 6,-108.5 0,-102.5 0,-96.5 0,-96.5 0,-12.5 0,-12.5 0,-6.5 6,-0.5 12,-0.5"/>
<text text-anchor="start" x="6.5" y="-95.7" font-family="Arial Bold" font-size="11.00">ActiveAdmin::Comment</text>
<polyline fill="none" stroke="black" points="0,-88.5 144,-88.5 "/>
<text text-anchor="start" x="7" y="-75.5" font-family="Arial" font-size="10.00">author_id </text>
<text text-anchor="start" x="50" y="-75.5" font-family="Arial Italic" font-size="10.00" fill="#999999">integer (8)</text>
<text text-anchor="start" x="7" y="-62.5" font-family="Arial" font-size="10.00">author_type </text>
<text text-anchor="start" x="62" y="-62.5" font-family="Arial Italic" font-size="10.00" fill="#999999">string</text>
<text text-anchor="start" x="7" y="-49.5" font-family="Arial" font-size="10.00">body </text>
<text text-anchor="start" x="32" y="-49.5" font-family="Arial Italic" font-size="10.00" fill="#999999">text</text>
<text text-anchor="start" x="7" y="-36.5" font-family="Arial" font-size="10.00">namespace </text>
<text text-anchor="start" x="61" y="-36.5" font-family="Arial Italic" font-size="10.00" fill="#999999">string</text>
<text text-anchor="start" x="7" y="-23.5" font-family="Arial" font-size="10.00">resource_id </text>
<text text-anchor="start" x="61" y="-23.5" font-family="Arial Italic" font-size="10.00" fill="#999999">integer (8)</text>
<text text-anchor="start" x="7" y="-10.5" font-family="Arial" font-size="10.00">resource_type </text>
<text text-anchor="start" x="72" y="-10.5" font-family="Arial Italic" font-size="10.00" fill="#999999">string</text>
</g>
<!-- m_User -->
<g id="node2" class="node">
<title>m_User</title>
<path fill="none" stroke="black" d="M185.5,-0.5C185.5,-0.5 346.5,-0.5 346.5,-0.5 352.5,-0.5 358.5,-6.5 358.5,-12.5 358.5,-12.5 358.5,-96.5 358.5,-96.5 358.5,-102.5 352.5,-108.5 346.5,-108.5 346.5,-108.5 185.5,-108.5 185.5,-108.5 179.5,-108.5 173.5,-102.5 173.5,-96.5 173.5,-96.5 173.5,-12.5 173.5,-12.5 173.5,-6.5 179.5,-0.5 185.5,-0.5"/>
<text text-anchor="start" x="251.5" y="-95.7" font-family="Arial Bold" font-size="11.00">User</text>
<polyline fill="none" stroke="black" points="173.5,-88.5 358.5,-88.5 "/>
<text text-anchor="start" x="181" y="-75.5" font-family="Arial" font-size="10.00">email </text>
<text text-anchor="start" x="208" y="-75.5" font-family="Arial Italic" font-size="10.00" fill="#999999">string U</text>
<text text-anchor="start" x="181" y="-62.5" font-family="Arial" font-size="10.00">encrypted_password </text>
<text text-anchor="start" x="275" y="-62.5" font-family="Arial Italic" font-size="10.00" fill="#999999">string</text>
<text text-anchor="start" x="181" y="-49.5" font-family="Arial" font-size="10.00">name </text>
<text text-anchor="start" x="209" y="-49.5" font-family="Arial Italic" font-size="10.00" fill="#999999">string</text>
<text text-anchor="start" x="181" y="-36.5" font-family="Arial" font-size="10.00">remember_created_at </text>
<text text-anchor="start" x="279" y="-36.5" font-family="Arial Italic" font-size="10.00" fill="#999999">datetime (6,0)</text>
<text text-anchor="start" x="181" y="-23.5" font-family="Arial" font-size="10.00">reset_password_sent_at </text>
<text text-anchor="start" x="291" y="-23.5" font-family="Arial Italic" font-size="10.00" fill="#999999">datetime (6,0)</text>
<text text-anchor="start" x="181" y="-10.5" font-family="Arial" font-size="10.00">reset_password_token </text>
<text text-anchor="start" x="283" y="-10.5" font-family="Arial Italic" font-size="10.00" fill="#999999">string</text>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.5 KiB