TFS Source Control best practises
mnc
Posts: 1
Hi,
We are new to DB source control but I have a question along the same lines as the discussion here: https://forum.red-gate.com/discussion/81262/source-control-in-dw-and-reporting-databases
I dont think the question was answered. As mentioned by lowerider, you can have different developers at different checkpoints.
For e.g.:
DEV Database
Developer 1 - working on a l/t project and is checking in data schemas/objects in TFS in a branch labelled: 'LT'
Developer 2 - needs a tactical fix.
Here's my understanding of how this should work
1. Dev 2 check out production branch and applies to DEV.
2. Makes changes and tests his code.
3. Commits to PROD branch when ready.
4. PROD db pulls that branch and applies.
5. Dev 1 checks out his original 'LT' branch and reapplies in DEV and continues his work.
However, in Redgate Tools, Get Latest says 'current version is always uptodate' and migration tab seems to compare DB to the leaf node of the main branch of TFS (?). How can migrations tab compare to a specific labelled node?
Am I thinking about this the wrong way? Should we move to a dedicated model even though we share a database?
We are new to DB source control but I have a question along the same lines as the discussion here: https://forum.red-gate.com/discussion/81262/source-control-in-dw-and-reporting-databases
I dont think the question was answered. As mentioned by lowerider, you can have different developers at different checkpoints.
For e.g.:
DEV Database
Developer 1 - working on a l/t project and is checking in data schemas/objects in TFS in a branch labelled: 'LT'
Developer 2 - needs a tactical fix.
Here's my understanding of how this should work
1. Dev 2 check out production branch and applies to DEV.
2. Makes changes and tests his code.
3. Commits to PROD branch when ready.
4. PROD db pulls that branch and applies.
5. Dev 1 checks out his original 'LT' branch and reapplies in DEV and continues his work.
However, in Redgate Tools, Get Latest says 'current version is always uptodate' and migration tab seems to compare DB to the leaf node of the main branch of TFS (?). How can migrations tab compare to a specific labelled node?
Am I thinking about this the wrong way? Should we move to a dedicated model even though we share a database?
Tagged:
Comments
To work with branches you would either need to have one DB for each branch or unlink and re-link from Source Control to change branch.
Please see the following document for more information on this: http://documentation.red-gate.com/display/SOC5/Working+with+branches
Using migration scripts on branches creates its own set of challenges because migration scripts are supposed to be deployed in order, here's some info on how to work with migration scripts and branches:
http://documentation.red-gate.com/display/SOC5/Branching+and+merging
Thank you,
Product Support Engineer
Redgate Software Ltd
Please see our Help Center for detailed guides on how to use our tools