Comments
2 comments
-
Hello TomIn my opinion the simplest way to help avoid problems like this is to take an approach where the main branch must always be shippable.In order to ensure that your main branch is always shippable, it's important to have a manual review step before changes are introduced to your main branch. This can be achieved by doing work on separate branches, then merging into the main branch only when the work is finished and has passed review. This ought to prevent the scenario where Test and Prod changes are introduced to the version to be shipped to customers.The next step is to set up a Continous Integration process. The CI proces should do things like verify the schema of the main branch, and run T-SQL tests. This should be done automatically whenever the main branch is pushed to the remote repository. The SQL Change Automation documentation explains how to do this: https://documentation.red-gate.com/sca3/automating-database-changes/continuous-integration.These processes ought to alert you to problems earlier on in your development process. CI is of course a large area and there's many opnions on how to set things up. I can point you to a couple more articles for further reading:ThanksMikiel
-
Mikiel,
Thanks for your reply. Our big issue was that branching is too slow and difficult under TFS, but we are moving to Git and hope to develop a good branching strategy going forward.
Regards,
Tom
Add comment
Please sign in to leave a comment.
What is the best strategy for keeping this straight? I'm guessing some kind of branching would work but I'm interested in knowing what Best Practices we can leverage.