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.