<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="271841" data-post-id="271841">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="fuelen" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/fuelen/120/9870_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  fuelen
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Thank you for detailed feedback!</p>
<aside class="quote no-group" data-username="Eiji" data-post="11" data-topic="41994">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/eiji/48/36743_2.png" class="avatar"> Eiji:</div>
<blockquote>
<p>By default do not include migrations schema as it’s used only by <code>ecto</code> internally</p>
</blockquote>
</aside>
<p>Sounds reasonable, but if there is an app that works with this table somehow, then we’d have to add more options to show the schema again. As for now, it can be easily removed using config file:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">[
  map_node: fn
    %{source: "schema_migrations"} -&gt; nil
    node -&gt; node
  end
]
</code></pre>
<aside class="quote no-group" data-username="Eiji" data-post="11" data-topic="41994">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/eiji/48/36743_2.png" class="avatar"> Eiji:</div>
<blockquote>
<ul>
<li>Can you change the <code>id</code> to something like: <code>id : id (schema_name.table_name)</code> (as passed to <code>schema</code> macro)?</li>
</ul>
</blockquote>
</aside>
<p>Primary keys are not required. Seems like you just want to see a table name. I think there are better ways of doing this, like add one more row which shows schema prefix and table name.</p>
<aside class="quote no-group" data-username="Eiji" data-post="11" data-topic="41994">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/eiji/48/36743_2.png" class="avatar"> Eiji:</div>
<blockquote>
<p>Can you also change other <code>id</code> fields to something like <code>field_name : id (schema_name.table_name.foreign_key_field_name)</code></p>
</blockquote>
</aside>
<p>It is a bit noisy. The downside of <code>PlantUML</code> is that it doesn’t support precise connections between fields (using arrows), as it is done in our dot renderer.<br>
What do you like in <code>PlantUML</code> the most? AFAIK, it uses <code>Graphviz</code> under the hood, and maybe we can modify/add an option to our dot renderer to have similar experience.</p>
<aside class="quote no-group" data-username="Eiji" data-post="11" data-topic="41994">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/eiji/48/36743_2.png" class="avatar"> Eiji:</div>
<blockquote>
<p>Could you by default use last 2 parts of <code>Elixir</code> module, so we have just short <code>MyContext.MySchema</code> instead of <code>MyApp.MyContext.MySchema</code>?</p>
</blockquote>
</aside>
<p>That’s a good idea to have an ability to format module name, but definitely not by default, as such names can overlap.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="271841" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/ecto-erd-entity-relationship-diagram-generator-for-ecto/41994/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-271841" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="271841"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #11"></div>
  </section>
</div>
    <div class="postbit" id="271872" data-post-id="271872">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Eiji" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/Eiji/120/36743_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Eiji
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="fuelen" data-post="12" data-topic="41994">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/fuelen/48/9870_2.png" class="avatar"> fuelen:</div>
<blockquote>
<p>Sounds reasonable, but if there is an app that works with this table somehow, then we’d have to add more options to show the schema again. As for now, it can be easily removed using config file:</p>
</blockquote>
</aside>
<p>I think working with that table is bad practice. First of all <code>ecto</code> rely on it, so developer should not:</p>
<ol>
<li>modify existing columns</li>
<li>remove table</li>
<li>add/modify/remove any rows</li>
</ol>
<p>I don’t also see how other libraries are gonna using it and what’s more important is that <code>schema_mirations</code> is not documented anywhere in <code>ecto</code> and <code>ecto_sql</code> hex documentation (there is only <code>schema_miration</code> option in <code>Repo</code> callback). I would say that using <code>schema_mirations</code> table in any way is like using a private API.</p>
<aside class="quote no-group" data-username="fuelen" data-post="12" data-topic="41994">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/fuelen/48/9870_2.png" class="avatar"> fuelen:</div>
<blockquote>
<p>Primary keys are not required. Seems like you just want to see a table name. I think there are better ways of doing this, like add one more row which shows schema prefix and table name.</p>
</blockquote>
</aside>
<p>Yeah, I completely forgot about that <img src="https://forum.elixirforum.com/images/emoji/apple/sweat_smile.png?v=15" title=":sweat_smile:" class="emoji" alt=":sweat_smile:" loading="lazy" width="20" height="20"> In that case it should be in new line under <code>Module.Name</code>.</p>
<aside class="quote no-group" data-username="fuelen" data-post="12" data-topic="41994">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/fuelen/48/9870_2.png" class="avatar"> fuelen:</div>
<blockquote>
<p>What do you like in <code>PlantUML</code> the most?</p>
</blockquote>
</aside>
<p>In my personal opinion the diagram is the most clear. It’s not like that from very start I liked the arrows (maybe legend for them?) or colors, but I was used to it very quickly.</p>
<aside class="quote no-group" data-username="fuelen" data-post="12" data-topic="41994">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/fuelen/48/9870_2.png" class="avatar"> fuelen:</div>
<blockquote>
<p>That’s a good idea to have an ability to format module name, but definitely not by default, as such names can overlap.</p>
</blockquote>
</aside>
<p>Yes, I also reminded that there could be for example <code>.Schema</code> suffix, so it’s better to make it easily configurable.</p>
<p>Ok, after modifications this is what I have in mind:</p>
<div class="md-table">
<table>
<thead>
<tr>
<th>MyContext.MySchema<br><sub>my_schema.my_table</sub></th>
</tr>
</thead>
<tbody>
<tr>
<td>id : id</td>
</tr>
<tr>
<td>assoc_field (assoc_field_id) : id (foreign_key_id)<br>string_field (legacy_string_field_source) : string<br>integer_field : int</td>
</tr>
</tbody>
</table>
</div><p>If we could make <code>DOT</code> layout looks like <code>PlantUML</code> image then yes - with field connection it would be even more amazing and we do not need to note <code>foreign_key_id</code> then.</p>
<p>Generally I would like to use such graphs to show other people context about planned <code>API</code> (context + module) and <code>database</code> structure (source fields). This is why for example <code>MyApp</code> is completely not needed and so on …</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="271872" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/ecto-erd-entity-relationship-diagram-generator-for-ecto/41994/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-271872" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="271872"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #12"></div>
  </section>
</div>
    <div class="postbit" id="393027" data-post-id="393027">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="fuelen" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/fuelen/120/9870_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  fuelen
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Ecto ERD v0.8.0 is out! <img src="https://forum.elixirforum.com/images/emoji/apple/tada.png?v=15" title=":tada:" class="emoji" alt=":tada:" loading="lazy" width="20" height="20"></p>
<p>Highlights:</p>
<ul>
<li>New D2 output format</li>
<li>Reworked docs a bit</li>
</ul>
<aside class="onebox allowlistedgeneric" data-onebox-src="https://github.com/fuelen/ecto_erd/releases/tag/v0.8.0">
  <header class="source">
      <img src="https://github.githubassets.com/favicons/favicon.svg" class="site-icon" alt="" width="32" height="32">

      <a href="https://github.com/fuelen/ecto_erd/releases/tag/v0.8.0" target="_blank" rel="noopener nofollow ugc">GitHub</a>
  </header>

  <article class="onebox-body">
    <div class="aspect-image" style="--aspect-ratio:690/344;"><img src="https://opengraph.githubassets.com/49568b0f52b793a5a704f69829bf35323b56985387d31b6f50d3e84f9929f46b/fuelen/ecto_erd/releases/tag/v0.8.0" class="thumbnail" alt="" width="690" height="345"></div>

<h3><a href="https://github.com/fuelen/ecto_erd/releases/tag/v0.8.0" target="_blank" rel="noopener nofollow ugc">Release v0.8.0 · fuelen/ecto_erd</a></h3>

  <p>What's Changed

Add D2 output format by @KTSCode in #64
Replace legacy repository-based examples with reproducible local sample schemas and lightweight SVG documentation
Improve the missing :otp_ap...</p>


  </article>

  <div class="onebox-metadata">
    
    
  </div>

  <div style="clear: both"></div>
</aside>
 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="393027" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/ecto-erd-entity-relationship-diagram-generator-for-ecto/41994/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-393027" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="393027"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-last-post cat-last-post" title="Last post!"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <span class="all-loaded">— All posts loaded —</span>
</div></template></turbo-stream>