Branching & Merging Strategy for Redgate Deploy (Flyway)
Lauther
Posts: 16 Bronze 2
We are implementing databases code changes automation using Redgate Deploy (Flyway) + Azure DevOps for SQL Server databases.
We are thinking having: master ==> development ==> "feature branches", and delaying migrations creation until merging with "development" and approve code reviews, to finally merge with "master" to trigger pipeline actions (build and then deploys).
However, somebody in the project team started to talk about the importance to keep "master" branches as images of production databases, which would imply merge with "master" only after changes are deployed to production and force to create a another branch sat in the middle between "master" and "development" to move migrations for pipelines actions. Is that the right approach? Is there a cookbook somewhere on how is the best way to implement?
Thanks in advance!
L.
We are thinking having: master ==> development ==> "feature branches", and delaying migrations creation until merging with "development" and approve code reviews, to finally merge with "master" to trigger pipeline actions (build and then deploys).
However, somebody in the project team started to talk about the importance to keep "master" branches as images of production databases, which would imply merge with "master" only after changes are deployed to production and force to create a another branch sat in the middle between "master" and "development" to move migrations for pipelines actions. Is that the right approach? Is there a cookbook somewhere on how is the best way to implement?
Thanks in advance!
L.
Tagged:
Answers
Your question seems principally aimed at DevOps branching strategies in general more than Flyway, but I'll attempt to address both.
The slight cop-out answer is 'what works best for you' but we can qualify it a bit; I'm in favour of applying a simplified Amdahl's law to such things, essentially, put in the effort where it will have the greatest value for you.
The strengths and weaknesses of the various strategies have been explored in depth by many people and I'd encourage you to check them out.
There a good 'top three' breakdown here which I think is easily digestable
https://www.bmc.com/blogs/devops-branching-strategies/
Though if you looking for feedback, I'd recommend devops.stackexchange.com.
Regarding the utilisation of branches in Flyway, we have a simple talk on the topic and multiple customers are successfully using it.
https://www.red-gate.com/hub/product-learning/flyway/flyway-branching-walkthrough
Thanks for your reply, it is really helpful and puts me in the right track toward a final definition for my project.
L.