<p><a href="https://github.com/jeneric" class="user-mention">@jeneric</a> Right, so... I have been thinking how exactly to answer this. Make no mistake - I am not making this hard on purpose. The easiest thing to do would be to just show you the actual solution which is literally a 2 line diff (except the actual test, which is required to merge the work). However this will represent a lost teaching opportunity. After all I am not just trying to solve your problem, but hope you can gain an extra viewpoint in the process. </p>

<p>Instead I want to understand where your confusion lies, and what docs I could improve to make sure it doesn't happen to others in the future. </p>

<p>The immediate problem with your approach is that you are polluting the existing Schema. You kinda answer the question yourself in: <code>I'm uncertain why the class wasn't added to the schema in the past, could it have been that supporting methods weren't available to ensure that it wasn't touched during deploy?</code>. The reason it was never added is so that nothing <em>needs</em> to sanitize things after the fact. It is always easier to never add something, rather than removing it after the fact.</p>

<p>More fundamentally you seem to be going down the wrong path because you assume that <code>$schema_instance</code> == <code>separate connection</code>. This is completely untrue. Please reread the piece I linked to earlier in <a href="https://github.com/dbsrgits/dbix-class/pull/57#issuecomment-53374573" class="issue-link" title="Disconnect after schema version check.">#57 (comment)</a>: <code>...clearly you are looking into a shared $dbh as can be seen in the second bullet point here: https://metacpan.org/pod/DBIx::Class::Storage::DBI#connect_info.</code></p>

<p>If after the above you are still not entirely sure what I keep suggesting and would rather just move on - let me know and I will fix the code in question.</p>

<p>Cheers and thank you for your patience ;)</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br>Reply to this email directly or <a href="https://github.com/dbsrgits/dbix-class/pull/57#issuecomment-54744656">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/302594__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcyNTcxMDI1OCwiZGF0YSI6eyJpZCI6NDA1Mzc4OTd9fQ==--3c994bbcb0f5e15abdb0b22e651d88832edb5f4d.gif" width="1" /></p>