The era of “just ask the LLM” has made us remarkably productive, but it has also made us dangerously comfortable. We are currently witnessing a shift where developers are offloading critical infrastru
blog.ahmershah.dev4 min read
This hit close to home! I’ve been migrating parts of my project to Go lately, and your post is a huge reality check. It’s easy to forget that AI produces valid SQL but ignores production scale and lag—I’m definitely going back to double-check my migration files now lol.
This is one of those areas where AI can look correct while being extremely dangerous. Database migrations are not just code generation.
They’re - data integrity, rollback safety, sequencing, dependency awareness and production state management
A migration that “works locally” can still create irreversible problems in production. AI is useful for scaffolding here, but blindly applying generated migrations without understanding the impact is asking for trouble.
It was intresting & I enjoyed reading this but I has some questions like what if Ai do the work but we check it that what is it doing ?
Syntax-perfect migrations are the most dangerous kind because they pass the linter but fail the production environment. Realizing that AI lacks the context of your specific traffic patterns is the first step toward building a resilient, high-performance database architecture.
Local environments are a dangerous sandbox. What runs in 10ms on a dev machine can easily lock a production table for minutes. This post is a great reminder that understanding the underlying engine—like how PostgreSQL handles NOT NULL constraints—is what prevents total outages.
The GitLab example is a perfect cautionary tale here. We’re moving toward a world where the "syntactically correct" becomes the enemy of the "operationally sound." Using AI for the initial DDL is fine, but if you aren't manually checking the execution plan and lock hierarchy, you're just gambling with your production uptime.
AI is great for boilerplate, but the context gap in production is a massive risk. Great read.
Total table locks are a nightmare. This breakdown of batch updates vs AI defaults is spot on.
Strong point. AI can draft migrations, but production safety still needs human review and rollout planning.
Kasha Ghani
Spreading Love
Context is everything in database management.