This was posted by myself on Reddit a few days ago. Posting it here as I heard some haskellers don’t lurk on Reddit. Some comparisons to existing tools exist in the Reddit thread, but please don’t be afraid to ask in case you don’t visit/like Reddit.
I’d like to announce Codd. Link to GitHub.
Codd is a tool that applies plain postgres SQL migrations atomically (when postgres allows it) and enforces schema consistency checks to ensure different environments have the same schema. It also helps by providing meaningful merge conflicts for when e.g. different developers modify the same DB objects, among other interesting features. Please check its GitHub docs for what it can do!
We’ve been using codd at PRODA for some months (though we’ve been using parts of it for far longer in a transition and test period) to apply our migrations, run schema consistency checks and manage our multiple environments’ databases, from dev to staging, production and tests. I’d like to thank my friends at PRODA for their support and feedback all this time: it has been invaluable.
Now I find it’s time to release codd to a broader audience, and thought of this community because it’s written in Haskell.
I hope the documentation on GitHub explains reasonably how codd works and its nuances. I’m open to questions and feedback of all kinds here as well!