<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Iago Balbino</title>
    <description>The latest articles on DEV Community by Iago Balbino (@iago_balbino_73b616ddc2c3).</description>
    <link>https://dev.to/iago_balbino_73b616ddc2c3</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4256481%2F6b4530a1-deb4-47de-9fb1-3665668e22f6.png</url>
      <title>DEV Community: Iago Balbino</title>
      <link>https://dev.to/iago_balbino_73b616ddc2c3</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/iago_balbino_73b616ddc2c3"/>
    <language>en</language>
    <item>
      <title>From PostgreSQL schema drift to a Python repair proposal with LangGraph</title>
      <dc:creator>Iago Balbino</dc:creator>
      <pubDate>Sat, 21 Nov 2026 00:00:31 +0000</pubDate>
      <link>https://dev.to/iago_balbino_73b616ddc2c3/from-postgresql-schema-drift-to-a-python-repair-proposal-with-langgraph-nhd</link>
      <guid>https://dev.to/iago_balbino_73b616ddc2c3/from-postgresql-schema-drift-to-a-python-repair-proposal-with-langgraph-nhd</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Flzwxm6edgx8qbf1jramh.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Flzwxm6edgx8qbf1jramh.gif" alt="SH-PSCBS workflow demo" width="800" height="424"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A column rename can leave application queries referring to a name that no longer exists. A migration changes the database, but the application still needs a compatible change.&lt;/p&gt;

&lt;p&gt;SH-PSCBS is my experimental tool for connecting those two sides. It detects PostgreSQL schema differences and prepares code repair proposals for review.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try the workflow
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/iago511/Self-Healing-Polyglot-Schema-Code-Bifurcation-System.git sh-pscbs
&lt;span class="nb"&gt;cd&lt;/span&gt; sh-pscbs
docker compose -f compose.demo.yaml up --build --exit-code-from demo --attach demo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The demo renames a column, shows a SQL diff, runs pytest, and verifies an approved commit against a disposable local Git remote. Model responses are simulated, so no API key or Ollama installation is required for this example.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why a graph?
&lt;/h2&gt;

&lt;p&gt;Each detected change becomes an event. The workflow can need clarification, a correction, another validation attempt, or a human decision. LangGraph expresses those routes, while SQLite stores snapshots, event state, and decisions.&lt;/p&gt;

&lt;p&gt;Analysis identifies schema changes and code evidence. Planning uses Groq with read-only tools. Correction uses Ollama in an isolated project copy. Validation checks integrity and syntax and runs pytest in a network-isolated Docker container. Review compares the plan, diff, and results.&lt;/p&gt;

&lt;p&gt;Approval creates a commit on a separate branch only after the required checks. A separate publish command pushes that branch. The destination repository still needs review and merge.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where it needs work
&lt;/h2&gt;

&lt;p&gt;This is experimental and currently focuses on PostgreSQL and Python. The CLI uses Portuguese command names. A dropped column and an added column may indicate a rename, but that is an inference. Polling can miss short-lived changes. A green test suite only covers what the tests exercise.&lt;/p&gt;

&lt;p&gt;Groq receives relevant code and context for planning and review; generation uses Ollama. Review that data flow before monitoring private projects.&lt;/p&gt;

&lt;h2&gt;
  
  
  Help shape the tool
&lt;/h2&gt;

&lt;p&gt;The repository includes an MIT license, architecture and usage guides, and a contribution guide. Feedback on ambiguous migrations, repair evaluation, and the first-run experience would help. Try the demo and report the smallest example that reproduces a problem.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/iago511/Self-Healing-Polyglot-Schema-Code-Bifurcation-System" rel="noopener noreferrer"&gt;Source and demo&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>python</category>
      <category>postgres</category>
      <category>opensource</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
