Ask HN: Declarative database migrations?
I've used a number of imperative migration systems, most of which are baked into application stacks. They scratch an itch, but I've always found them a cumbersome and time consuming.
What I really want to do is declare what schema I want, and have a tool (ideally separate from an application stack) which will look at the existing schema and create a diff to update the schema based on what I've declared.
I actually implemented a very basic tool like this for MySQL for a project I was doing a few years ago which created and altered tables and indexes, and there were some pitfalls around destructive changes but on the whole it was very pleasant to use as long as you understood the pitfalls. I'm having trouble finding any similar tools around though and would love to hear any recommendations.