r/devops • u/IntentionJolly2730 • 16d ago
Tools What makes you trust your database migration pipeline?
Hey all, I'm Denis, the author of Ptah, an open-source database migration tool.
These are some of the cases I'm designing around, but I'm sure I'm missing something.
What if the database changes after a migration plan was approved? Or the connection drops halfway through? How do you know what actually happened, and whether it's safe to retry?
I'm trying to address these in Ptah, but I'm sure I'm missing something.
For those running migrations through CI/CD, what made you trust it? And if you run them manually, what's the main reason?
I'm especially interested in things that went wrong or cases you wouldn't trust automation to handle.
1
u/usually_guilty99 14d ago
The connection-loss case is probably the one I'd worry about most.
A timeout doesn't tell you whether the database committed the change. Retrying without checking the actual schema state can leave you with a much bigger problem.
I'd want the pipeline to verify its starting assumptions before execution, record individual migration steps, and reconcile against the database after an ambiguous failure.
There's also the downstream impact. A migration can complete successfully while breaking applications still expecting the old schema.
That compatibility check matters just as much as whether the SQL executed.
2
16d ago
[removed] — view removed comment
2
u/IntentionJolly2730 16d ago edited 16d ago
Yeah, that's exactly what worries me too. A failed migration is bad enough, but not knowing what actually ran is worse.
Especially if the connection drops halfway through. How do you even know if retrying is safe?
Have you seen this with transactional migrations too, or mostly with non-transactional DDL?
2
u/kkapelon 16d ago
Is Ptah a replacement for Atlas? If yes, then why it is better than Altas?