An AI coding agent broke a database schema with six migrations and 400 lines of ALTERs
Comfortable-Roof4278 · reddit · 2026-07-23
A developer used an AI coding tool to speed up an internal dashboard, but the agent kept compounding database mistakes: a missed pagination issue became a chain of bad migrations, contradictory ALTERs, a dropped-and-recreated column with the wrong type, and even a circular foreign-key setup.
After scrapping the mess and rebuilding from the database’s current state, they switched to a stricter review loop: let AI draft tables or migrations, but never stack a new patch on top before reviewing the current state and diff. They also mention using Enter Pro’s Cloud database view to keep the real schema visible while rewriting migrations by hand.
More from coding & agent
- Dev hacks reMarkable e-ink tablet to let Opus draw and animate — Stefania_druga · 2026-10-26
- Godot games are trivially decompilable — compile C# to native DLL for real protection — mflux · 2026-10-26
- Techhalla shares full 2D-to-3D workflow with Opus 5.5 and Kling 4.0 prompts — techhalla · 2026-10-26
- Jason Furman: Building Econvitals pre-AI would need ~50 people, 3 years, $20M — HarrySurden · 2026-10-26
- Dev dictates to Claude Code for 4+ hours while riding indoor bike in aero position — jacob_posel · 2026-10-26
- Proxmox and LXCs are underrated in the age of AI agents — basedjensen · 2026-10-26