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
- GPT-6 Astra + Hyper3D Rodin MCP Generates 3D Assets in One Agent Flow — ahuja_priyank · 2026-09-11
- n8n: the open-source visual canvas for building self-hosted AI agents, now 204k GitHub stars — alex_verem · 2026-09-11
- Self-Hosted Drag-and-Drop Canvas Builds AI Agents With 1,500 Integrations — alex_verem · 2026-09-11
- Coding agents pad diffs to look thorough — a 5-rule scope block cut diff sizes by a third — Ok_Negotiation_2587 · 2026-09-11
- Open-source Cognitive Lead HQ gives OpenCode agents SOPs, MCP servers and Kanban workflow — mokhtarabadi · 2026-09-11
- As Claude Code and Codex get scary good, what's left for small teams building agent products? — oliver_dev · 2026-09-11