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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Just out of curiosity, have you simply tried searching all the text files that make up your Elixir codebase for <code>SQL.Sandbox</code> or even just <code>Sandbox</code>?</p>
<p>In my current application I don’t use the Ecto Sandbox either and everything in regards to testing and the database works the way I suspect you desire.  However, if I or someone else had added code making use of the Ecto Sandbox to the project (a necessary step for it to be used: it’s fully opt in) and I wanted to get rid of it, but couldn’t: I’d do that simple brute force search to see what remnants might have been missed.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="308356" 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/phoenix-how-to-disabled-ecto-sanbox-in-test-test-without-sandbox/59734/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-308356" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="308356"
                     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="308357" data-post-id="308357">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="LionelMarco" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/LionelMarco/120/26936_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  LionelMarco
                    <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">
								<aside class="quote no-group" data-username="sbuttgereit" data-post="12" data-topic="59734">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/sbuttgereit/48/30162_2.png" class="avatar"> sbuttgereit:</div>
<blockquote>
<p>in regards to</p>
</blockquote>
</aside>
<p>Hi, can you share your:<br>
mix.exs<br>
config/test,exs<br>
test/support/data_case.ex<br>
and  a simple test</p>
<p>Greetings</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="308357" 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/phoenix-how-to-disabled-ecto-sanbox-in-test-test-without-sandbox/59734/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-308357" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="308357"
                     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="308362" data-post-id="308362">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group quote-modified" data-username="LionelMarco" data-post="13" data-topic="59734">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/lionelmarco/48/26936_2.png" class="avatar"> LionelMarco:</div>
<blockquote>
<p>Hi, can you share your: [<strong>CLIP</strong>]</p>
</blockquote>
</aside>
<p>I strongly suggest you try my original suggestion of doing search for other sandbox references before diving into my code.  Also, others here may have something closer to what you’re looking for in terms of standard Elixir development practice.  But, if to do nothing more than to prove the old adage “<em>be careful what you ask for</em>”, please find the best I can do with your requests.</p>
<p>My code is source available (though not open source) and I will provide links to the closest analogues to a simple Phoenix project from my code,  but know that my code is not going to help you, especially if you’re trying to come to terms with standard Elixir development practices.</p>
<p>My project has a fair number of non-standard/unconventional practices for Elixir development (reasons™, some good, some bad).  A few of these to be aware of which pertain to you:</p>
<ul>
<li>
<p>For Phoenix:</p>
<ul>
<li>
<p>It’s an umbrella project (due to the possibility of different release profiles; this is not an umbrella for logical code organization).</p>
</li>
<li>
<p>The Phoenix part of my application pretty strictly only provides Web and external API interfaces.  There is no business logic or “contexts” beyond the minimum to make the external interfaces work nor is there direct database access from the Phoenix related code.  Business logic, and data access, comes through dependencies.</p>
</li>
<li>
<p>The only Phoenix provided templates I use are those generated when calling <code>mix phx.new --umbrella --no-ecto</code>.  I don’t use the generators and there is no Ecto at all configured in Phoenix.</p>
</li>
<li>
<p>The Phoenix parts of my application are the least developed at this stage.</p>
</li>
</ul>
</li>
<li>
<p>For database related code and testing:</p>
<ul>
<li>
<p>All business logic, including logic requiring the database, are kept in standard (not Phoenix) Elixir projects which act in a library-like way and are very narrowly scoped to specific features.  There are Elixir projects where these lower level libraries are orchestrated into full fledged applications, but again, these are not Phoenix projects, just normal old Elixir projects.</p>
</li>
<li>
<p>I use a custom database library which wraps Ecto to better meet my requirements.  This library includes a bespoke database migrator and Repo connection management system using Ecto Dynamic Repositories.</p>
</li>
<li>
<p>Because of the custom connection management stuff, I don’t use any of the <code>config/*.exs</code> configuration files for Ecto configuration.</p>
</li>
<li>
<p>All testing of the database is done in these library-like Elixir projects and uses the custom database stuff just mentioned.  The test themselves look like typical Ecto code because I don’t futz with the Ecto Query DSL.</p>
</li>
</ul>
</li>
</ul>
<p>So, again, if you are still fairly new to Elixir, Ecto, and/or Phoenix Framework my code will not help you and may well confuse you and lead you astray.  But if you really want to continue on that path…  your requests as best as I can fill them:</p>
<ul>
<li>
<p><code>mix.exs</code></p>
<p>Main Phoenix <code>mix.exs</code>: <a href="https://github.com/MuseSystems/musebms/blob/next_version/app_server/platform/msplatform/mix.exs" rel="noopener nofollow ugc">https://github.com/MuseSystems/musebms/blob/next_version/app_server/platform/msplatform/mix.exs</a></p>
<p>“my_app” <code>mix.exs</code>: <a href="https://github.com/MuseSystems/musebms/blob/next_version/app_server/platform/msplatform/apps/msapp_mcp/mix.exs" rel="noopener nofollow ugc">https://github.com/MuseSystems/musebms/blob/next_version/app_server/platform/msplatform/apps/msapp_mcp/mix.exs</a></p>
<p>“my_app_web” <code>mix.exs</code>: <a href="https://github.com/MuseSystems/musebms/blob/next_version/app_server/platform/msplatform/apps/msapp_mcp_web/mix.exs" rel="noopener nofollow ugc">https://github.com/MuseSystems/musebms/blob/next_version/app_server/platform/msplatform/apps/msapp_mcp_web/mix.exs</a></p>
</li>
<li>
<p><code>config/test,exs</code></p>
<p>Phoenix <code>test.exs</code>: <a href="https://github.com/MuseSystems/musebms/blob/next_version/app_server/platform/msplatform/config/test.exs" rel="noopener nofollow ugc">https://github.com/MuseSystems/musebms/blob/next_version/app_server/platform/msplatform/config/test.exs</a></p>
</li>
<li>
<p><code>test/support/data_case.ex</code>: I have no <code>data_case.ex</code> file anywhere in the application as I don’t use the generators.</p>
</li>
<li>
<p><code>and a simple test</code>:</p>
<p>A data related test from one of the library components, though it is not enough to look at this test file to understand what is really happening behind the scenes with repos and database connections, you’ll need to look in the <code>test/support</code> directory and even then it won’t be standard Ecto repo management: <a href="https://github.com/MuseSystems/musebms/blob/next_version/app_server/components/system/mscmp_syst_perms/test/perm_test.exs" class="inline-onebox" rel="noopener nofollow ugc">musebms/app_server/components/system/mscmp_syst_perms/test/perm_test.exs at next_version · MuseSystems/musebms · GitHub</a></p>
</li>
</ul>
<p>To really understand what’s going in this application and to navigate the application code any better you’ll need to read the docs at: <a href="https://docs.muse.systems/technical" class="inline-onebox" rel="noopener nofollow ugc">Technical Documentation | Muse Systems Business Management System</a> (what of them actually exists).</p>
<p>Cheers!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="308362" 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/phoenix-how-to-disabled-ecto-sanbox-in-test-test-without-sandbox/59734/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-308362" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="308362"
                     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 #13"></div>
  </section>
</div>
    <div class="postbit" id="308371" data-post-id="308371">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="LionelMarco" data-post="11" data-topic="59734">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/lionelmarco/48/26936_2.png" class="avatar"> LionelMarco:</div>
<blockquote>
<p>To test each area needs the data from the previous one. And each area tests in due time. In times unrelated to those of the others.</p>
</blockquote>
</aside>
<p>I am probably not understanding you well here but what exactly is stopping you from having several DB dumps that you can restore on top of each other? And then when you want to test a certain scenario that needs database dump 1, 4 and 6, you just make a <code>mix</code> task alias to clear up the test DB and then load those dumps in order?</p>
<p>I’ve done that too, several times in my career. There’s really no point in running expensive seeding scripts if the required test data barely changes; so just make one functional and good copy of the DB and <code>pg_dump</code> it and then <code>pg_restore</code> it before tests.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="308371" 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/phoenix-how-to-disabled-ecto-sanbox-in-test-test-without-sandbox/59734/15">Post #14</a>
	                </div>
	            </div>
              <div id="likers-container-308371" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="308371"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-solved cat-solved" title="Marked as solution"></div>
  </section>
</div>
    <div class="postbit" id="308669" data-post-id="308669">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="LionelMarco" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/LionelMarco/120/26936_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  LionelMarco
                    <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>Thanks Dimitarvp, I made a mix between seed and test with sandbox and every thing work flawlesslly.</p>
<p><strong>When in Rome, do as the Romans do</strong></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="308669" 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/phoenix-how-to-disabled-ecto-sanbox-in-test-test-without-sandbox/59734/16">Post #15</a>
	                </div>
	            </div>
              <div id="likers-container-308669" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="308669"
                     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 #15"></div>
  </section>
</div>
    <div class="postbit" id="364754" data-post-id="364754">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>But it would be so convenient to be able to disable the sandbox temporarily at the end of a test in order to produce a database dump and maintain consistency across tests (because seeds can quickly become inconsistent when testing while developing — whereas the test is always right).</p>
<p>For example:</p>
<p>– A test creates 1000 users, including 20 administrators<br>
– At the end of the test, by temporarily disabling the sandbox, I pg_dump the database (into “some-users.dump”)</p>
<p>– Another test starts from that dump by loading “some-users.dump”<br>
– This test does many other things<br>
– I dump the final result, again by temporarily disabling the sandbox, into “a-lot-of-work.dump”</p>
<p>– My third test starts from there by loading “a-lot-of-work.dump”</p>
<p>If I ever need to make further changes in the second test, I just run its test again and dump the updated database ( again by temporarily disabling the sandbox).</p>
<p>My third test then starts consistently from the updated “a-lot-of-work.dump”.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="364754" 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/phoenix-how-to-disabled-ecto-sanbox-in-test-test-without-sandbox/59734/17">Post #16</a>
	                </div>
	            </div>
              <div id="likers-container-364754" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="364754"
                     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 #16"></div>
  </section>
</div>
    <div class="postbit" id="367094" data-post-id="367094">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>The way the sandbox works is:</p>
<ol>
<li>start a database transaction at the start of the test</li>
<li>data gets inserted and updated in the database and read from the database within that transaction during the test</li>
<li>at the end of the test, roll back the transaction instead of committing it</li>
</ol>
<p>Since transaction  <code>COMMIT</code> never happens, the data is never really persisted in the database. So I don’t think <code>pg_dump</code> would have any access to it.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="367094" data-batch-url="/posts/batch_likers">
                        2
                      </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/phoenix-how-to-disabled-ecto-sanbox-in-test-test-without-sandbox/59734/18">Post #17</a>
	                </div>
	            </div>
              <div id="likers-container-367094" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="367094"
                     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 #17"></div>
  </section>
</div>
    <div class="postbit" id="367101" data-post-id="367101">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Thanks <a class="mention" href="/u/nathanl" rel="nofollow">@nathanl</a>, you’re right.</p>
<p>I don’t use sandbox anymore. Hence I can pg_dump my bdd.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="367101" 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/phoenix-how-to-disabled-ecto-sanbox-in-test-test-without-sandbox/59734/19">Post #18</a>
	                </div>
	            </div>
              <div id="likers-container-367101" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="367101"
                     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 #18"></div>
  </section>
</div>
    <div class="postbit" id="378961" data-post-id="378961">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="dli" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  dli
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Late to the party, but you can do <code>Ecto.Adapters.SQL.Sandbox.start_owner!(Repo, sandbox: false)</code> in your DataCase setup. This prevents wrapping each test in a transaction that is rolled back at the end of the test.</p>
<p>Some options like <code>sandbox</code> are passed to <a href="https://hexdocs.pm/ecto_sql/3.13.2/Ecto.Adapters.SQL.Sandbox.html#checkout/2" rel="noopener nofollow ugc"><code>Ecto.Adapters.SQL.Sandbox.checkout/2</code></a>. The behaviour is documented there.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="378961" data-batch-url="/posts/batch_likers">
                        2
                      </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/phoenix-how-to-disabled-ecto-sanbox-in-test-test-without-sandbox/59734/20">Post #19</a>
	                </div>
	            </div>
              <div id="likers-container-378961" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="378961"
                     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 #19"></div>
  </section>
</div>
    <div class="postbit" id="379254" data-post-id="379254">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="dli" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  dli
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>At the risk of necromancing this thread once more:</p>
<blockquote>
<p>you can do <code>Ecto.Adapters.SQL.Sandbox.start_owner!(Repo, sandbox: false)</code> in your DataCase setup</p>
</blockquote>
<p>I sometimes use this to peek into the database state when working on a specific test case.</p>
<p>This is especially helpful when testing insert logic, e.g. for bulk upserts. Obviously, you will need to reset the tables manually when you are done to not interfere with other tests.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="379254" 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/phoenix-how-to-disabled-ecto-sanbox-in-test-test-without-sandbox/59734/21">Post #20</a>
	                </div>
	            </div>
              <div id="likers-container-379254" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="379254"
                     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>