<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>
        <title>DeepDiff DB Blog</title>
        <link>https://iamvirul.github.io/deepdiff-db/blog</link>
        <description>DeepDiff DB Blog</description>
        <lastBuildDate>Wed, 17 Dec 2025 00:00:00 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <language>en</language>
        <item>
            <title><![CDATA[The Hallway Conversation That Started DeepDiff DB]]></title>
            <link>https://iamvirul.github.io/deepdiff-db/blog/building-deepdiffdb</link>
            <guid>https://iamvirul.github.io/deepdiff-db/blog/building-deepdiffdb</guid>
            <pubDate>Wed, 17 Dec 2025 00:00:00 GMT</pubDate>
            <description><![CDATA[On the 17th of December 2025, I walked into WSO2 as a fresh intern. Two days later, I met Kaviru Hapuarachchi — a chance introduction that would eventually turn into the project you are reading about right now.]]></description>
            <content:encoded><![CDATA[<p>On the 17th of December 2025, I walked into WSO2 as a fresh intern. Two days later, I met <strong><a href="https://github.com/Kavirubc" target="_blank" rel="noopener noreferrer">Kaviru Hapuarachchi</a></strong> — a chance introduction that would eventually turn into the project you are reading about right now.</p>
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="the-hallway-moment">The Hallway Moment<a href="https://iamvirul.github.io/deepdiff-db/blog/building-deepdiffdb#the-hallway-moment" class="hash-link" aria-label="Direct link to The Hallway Moment" title="Direct link to The Hallway Moment">​</a></h2>
<p>It was an ordinary weekday. I was rushing to make it to a meeting on time when Kaviru stopped me in the hallway and said he had an idea he wanted to share. I was already late so I told him I'd catch up with him afterwards.</p>
<p>That afternoon I found him and he laid it out simply:</p>
<blockquote>
<p><em>"These days we have database migration tools. We have database introspection tools — like Ballerina Persist right here at WSO2. But there's still no good tool for managing the <strong>drift</strong> between a production database and a staging or development database. Someone should build that."</em></p>
</blockquote>
<p>He was right. I had felt that pain myself. You write a migration, you test it on dev, you think you're good — and then prod has three columns that were added out of band six months ago and nobody told the schema file. You only find out when something breaks.</p>
<p>Kaviru didn't pitch it as a startup idea or a side hustle. He just said it mattered and it didn't exist yet. That was enough.</p>
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="from-conversation-to-code">From Conversation to Code<a href="https://iamvirul.github.io/deepdiff-db/blog/building-deepdiffdb#from-conversation-to-code" class="hash-link" aria-label="Direct link to From Conversation to Code" title="Direct link to From Conversation to Code">​</a></h2>
<p>I went home that evening and started sketching out what such a tool would actually need to do:</p>
<ul>
<li><strong>Connect to two databases</strong> — prod and dev — and compare them at both schema and data level</li>
<li><strong>Not just detect drift</strong>, but produce something actionable: a reviewable SQL migration pack</li>
<li><strong>Be safe by default</strong> — read-only until you explicitly tell it to apply anything</li>
<li><strong>Work across databases</strong> — MySQL, Postgres, SQLite, and beyond</li>
</ul>
<p>The first version was rough. But the core idea held up: give engineers a reliable, deterministic answer to <em>"what is different between these two databases, and what would it take to close that gap?"</em></p>
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="what-deepdiff-db-became">What DeepDiff DB Became<a href="https://iamvirul.github.io/deepdiff-db/blog/building-deepdiffdb#what-deepdiff-db-became" class="hash-link" aria-label="Direct link to What DeepDiff DB Became" title="Direct link to What DeepDiff DB Became">​</a></h2>
<p>A few months and many commits later, DeepDiff DB does quite a lot more than that first sketch:</p>
<ul>
<li>Schema drift detection across tables, columns, indexes, and foreign keys</li>
<li>Row-level data diffing using SHA-256 per-row hashing</li>
<li>Streaming large tables with keyset pagination — memory stays flat no matter the size</li>
<li>Conflict detection and interactive resolution</li>
<li>HTML diff reports</li>
<li>A full <strong>Git-like versioning system</strong> — <code>version commit</code>, <code>version branch</code>, <code>version checkout</code>, <code>version tree</code> — so you can track your database's history the same way you track code</li>
</ul>
<p>But the foundation is still exactly what <a href="https://github.com/Kavirubc" target="_blank" rel="noopener noreferrer">Kaviru</a> described in that hallway: a tool that makes the space between prod and dev legible and manageable.</p>
<h2 class="anchor anchorWithStickyNavbar_LWe7" id="credits">Credits<a href="https://iamvirul.github.io/deepdiff-db/blog/building-deepdiffdb#credits" class="hash-link" aria-label="Direct link to Credits" title="Direct link to Credits">​</a></h2>
<p>The idea belongs to <strong><a href="https://github.com/Kavirubc" target="_blank" rel="noopener noreferrer">Kaviru Hapuarachchi</a></strong>. I built it, but the insight that this gap existed and was worth solving came from him. If DeepDiff DB ever saves you from a production incident, a good chunk of that credit goes to a conversation that almost didn't happen because I was running late to a meeting.</p>
<hr>
<p>If you want to try it:</p>
<div class="language-bash codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-bash codeBlock_bY9V thin-scrollbar" style="color:#393A34;background-color:#f6f8fa"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain">brew </span><span class="token function" style="color:#d73a49">install</span><span class="token plain"> iamvirul/deepdiff-db/deepdiff-db</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div>
<p>Or grab a binary from the <a href="https://github.com/iamvirul/deepdiff-db/releases" target="_blank" rel="noopener noreferrer">releases page</a>.</p>
<p>The code is open source at <a href="https://github.com/iamvirul/deepdiff-db" target="_blank" rel="noopener noreferrer">github.com/iamvirul/deepdiff-db</a>. Issues, PRs, and feedback are all welcome.</p>
<p><em>Happy diffing — and may your prod and dev schemas never drift apart. 🚀</em></p>]]></content:encoded>
            <category>origin</category>
            <category>story</category>
            <category>databases</category>
            <category>go</category>
            <category>open-source</category>
        </item>
    </channel>
</rss>