4 ms·
What is the best mechanism for managing database updates, schema changes, etc.?
At my current company, we have several scrum teams. Each sprint, they usually have a story or two that require database changes (postgres).
All of our update scripts are numbered. Our current system is to have a manual process for claiming update scripts (wiki page update, jira tickets, then emails to QA/OPS/Dev). This informs QA that they need to run an update script when they switch a testing server to that story's feature branch, and Ops makes note to run the script when a production release occurs.
The problem is, once a QA server has the script run, it's a pain to remove it. If the server is repurposed to a different branch, the script really shouldn't be applied anymore. If a story is not completed by the end of the sprint, you have a server with an unneeded schema change applied.
The whole process is also fraught with errors because of so many manual steps.
Sure, we could always reset the server's database to a backup, but this causes problems too in regards to historical data.
Basically, what is the best mechanism for dealing with DB schema and migrations in 2015?
I have a really good idea for an open source project to make this much better, but I want to see what is out there right now. My googles haven't turned up much.
- eip 11y agoYour google-fu is weak. Liquibase.