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


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="smpallen99" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/smpallen99/120/1157_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  smpallen99
                      <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><a class="mention" href="/u/eiji" rel="nofollow">@Eiji</a> Multiple repos might work. The  <code>prepare_version</code> function used the repo field in the changeset. So if your handling that already then the version records should get put in the correct repo. The <code>versions</code> helper function takes a :repo option, so that should work.</p>
<p>None of the other options are currently supported. I might try and tackle create this weekend. Your welcome to add feature request issues to the package to track these items.</p>
<p>I need to think about old new diff. We could add a diff map to the version object. The other option would be to provide a helper function to generate this from the database records on request.</p>
<p>If I can find the time this weekend, I’ll try to add an option to save create records. I can see the value of this from an auditing perspective.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="7770" 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/whatwasit-track-the-changes-to-your-ecto-models/1162/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-7770" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="7770"
                     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="8316" data-post-id="8316">
  <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">
								<p>I have more questions:</p>
<ol>
<li>Can you add support for IP?<br>
For example somebody used "Social engineering" and got access to one account and admin want to know what changes in database was made by from this IP.</li>
<li>Is it possible to get list of changes made by IP (see point 1) or whodoneit id (ex-content editor or ex-admin).<br>
Generic - multiple databases setup. For example umbrella apps: fetch all initialized repos and get versions all repos where ip is …</li>
<li>Is it possible or can you add support for revert X version or all changes made by IP or whodoneit id (see point 2).</li>
<li>Can you add log file support (if log file path was specified in configuration) for all tracked changes?<br>
Example:<br>
On &lt;date (when)&gt; &lt;what (for example article)&gt; with id &lt;id (for example article id)&gt; was &lt;action (create/destroy/update)&gt; by &lt;whodoneit.name (for example John)&gt; (id &lt;whodoneit.id (for example John’s id)&gt;.<br>
Why? For example:<br>
a) fail2ban or other third-party program - for example: rule to ban ip (matched with whodoneit.id - same ip and same author/user) from which created too more entries (spam bot using REST API).<br>
b) Somebody may not have accesss to database - he only want to get all IP addresses for John (grep by regex where for example whodoneit id is 5). Here I mean server admin/user, not project web admin or project developer.<br>
For this you can add one more field like: log_formatter_module (if not specified use default formatter).<br>
<code>defmodule MyProject.LogFormatter  def format(what_was_it) do      # returns: {:ok, result} tuple where result is log string  end end </code><br>
What do you think about it?</li>
</ol>
<p><strong>Edit:</strong><br>
Oh I forgot about map option.<br>
Can I keep relation for user model and store map (with request data) at same time?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="8316" 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/whatwasit-track-the-changes-to-your-ecto-models/1162/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-8316" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="8316"
                     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>