A developer has created an experimental tool to bridge the gap between database schema changes and application code updates.
What Happens When a Database Column Is Renamed?
When a column in a PostgreSQL database is renamed, the application code that references the old name may break.
Even if the database migration is successful, the application must be updated to reflect the new schema.
Without a synchronized update, queries fail or return unexpected results.
Introducing SH-PSCBS
SH-PSCBS is a personal project designed to detect schema changes and generate code repair proposals.
It connects database schema differences with the application code that depends on them.
The tool runs a workflow that identifies changes and proposes fixes for review.
How the Workflow Works
- Clone the repository:
git clone https://github.com/iago511/Self-Healing-Polyglot-Schema-Code-Bifurcation-System.git sh-pscbs - Enter the directory:
cd sh-pscbs - Start the demo:
docker compose -f compose.demo.yaml up --build --exit-code-from demo --attach demo
The demo renames a column, shows a SQL diff, runs tests, and verifies a commit in a disposable local Git remote.
Why Use a Graph-Based Approach?
Each detected schema change is treated as an event in a workflow.
These events may require clarification, correction, or human review.
LangGraph models these decision paths, while SQLite stores snapshots, event states, and decisions.

Key Components and Processes
- Analysis: Identifies schema changes and code evidence.
- Planning: Uses Groq with read-only tools to generate a repair plan.
- Correction: Runs Ollama in an isolated project copy to generate code changes.
- Validation: Checks syntax, integrity, and runs pytest in a network-isolated Docker container.
- Review: Compares the plan, SQL diff, and test results.
- Approval: Creates a commit on a separate branch after all checks.
- Publish: Pushes the approved branch to a remote repository.
After approval, the destination repository still requires manual review and merge by a human.
Limitations and Open Questions
- The tool is experimental and currently supports only PostgreSQL and Python.
- CLI commands use Portuguese command names, which may hinder adoption.
- Inferring a column rename from a dropped and added column is not definitive.
- Short-lived changes may be missed due to polling intervals.
- A green test suite only validates what is tested — it does not guarantee full coverage.
- Model responses are simulated; real API keys or Ollama installations are not required for the demo.
Users are encouraged to report the smallest example that reproduces a problem to help improve the tool.
How to Contribute and Get Involved
The project includes an MIT license, architecture guides, and a contribution guide.
Feedback on ambiguous migrations, repair evaluation, and first-run experience is valuable.
Contributors are urged to try the demo and report issues.
For more on how developers use Git to track code evolution, see Spotify Wrapped for Git History.
Learn how AI can help with workflow transparency in AI Cost Transparency.
See how a developer turned maintenance errors into a monitoring tool in Maintenance Mistakes to Monitoring.
Original source: dev.to
GitHub repository: github.com
Demo animation: media2.dev.to
Sources & further reading
Featured image: original publisher image. Via original publisher. Image source
