In a previous job, we had an in-house tool that allowed us to, after switching branch in revision control, restore (via e.g. pg_restore) a database dump that was a best-effort attempt at being compatible with that new branch. It did this by walking up the commit tree to find the most recent commit-tagged database dump.

This allowed a developer to switch between and work on and/or review multiple different branches, whilst allowing them to run any migrations from a branch and writing data to the database in any new fields those migrations added. Developers were expected to manually "checkpoint" the database on branches to facilitate this.

This was very useful! Does an open source tool exist that does the same?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.