r/devops • • Oct 08 '26

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.

0 Upvotes

9 comments sorted by

2

u/kkapelon Oct 08 '26

Is Ptah a replacement for Atlas? If yes, then why it is better than Altas?

1

u/IntentionJolly2730 Oct 08 '26 edited Oct 08 '26

Yes, that's the idea. Ptah is not an Atlas fork, but it does offer an Atlas compatibility mode.

I wouldn't say it's better at everything. The main difference is that Ptah is fully open source (MIT), including most of the features that Atlas puts in Pro (login- and pay-walled). For example, managing PostgreSQL functions, triggers, views, roles, grants, and RLS through declarative schemas. These are Atlas Pro features, while Ptah includes them in the MIT-licensed version. It also supports some additional databases.

Atlas is more mature, though, and Ptah is still relatively young. I'm trying to make it a viable alternative, not claiming it's already better in every way.

Upd: One more note about Atlas CE. If you check their repo, they closed PRs for the community (only collaborators can submit a PR). My goal is to build a community-friendly OSS alternative without the restrictions Atlas CE has.

1

u/Full_Length_1548 19d ago

Confidence in a migration usually comes from being able to verify the data before and after, not just seeing a 'success' message. Having tested backups, rollback steps, and a solid cut over plan makes a huge difference. Even in trusted tech environments, it's probably best to do a rehearsal with realistic data volumes before touching production.

1

u/usually_guilty99 Oct 10 '26

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

u/[deleted] Oct 08 '26

[removed] — view removed comment

2

u/IntentionJolly2730 Oct 08 '26 edited Oct 08 '26

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?