3

We are looking to move from manual scripts to the RedGate database source control to manage our databases.

We want to make changes to stored procs/lookups etc and then just check them into to the SVN trunk which will fire a new TeamCity build. I've looked at the RedGate docs and some google results (eg http://www.troyhunt.com) and they appear to diff the schema which should be ok. The issue is the look up tables.

We have listed what tables are lookup/static tables (in SQL studio) but how can I get that list to the SQL Data compare tool (I guess I could look at the files in the Data folder)? Also, How would we go about updating existing data, eg upper case all surnames?

The other two bits of fun are we have multiple clients using the same database schema but some might be on version 0.3 and some on 0.4. I'm guessing we will need to change the source control binding in SQL when we want to work on a older version (e.g. for a bug fix to live)

Does anyone else perform continous deployments with multiple versions of databases?
Thanks

Michael Blake
  • 2,068
  • 2
  • 18
  • 31
  • "continuous deployment with multiple versions" is oxymoron :) – Aleš Roubíček Apr 09 '11 at 03:31
  • 2
    Why? Client A could be on version 3 and Client B is on 5. I want TeamCity to continuously deploy the correct version of a branch. So Client A will move to 3.1 and Client B will move to 5.3. – Michael Blake Apr 09 '11 at 11:54
  • in continuous deployment is only version - the latest. No branches no version numbers at all... – Aleš Roubíček Apr 10 '11 at 07:27
  • Why can you not setup CD with a branches? Eg a bug fix is required to live which is on 3.1. I want TeamCity to deploy the fix (3.2) to the (near) live environment when I commit. – Michael Blake Apr 10 '11 at 10:28
  • 3
    I disagree with rarous here, I'm in the same situation as mikeblake where I want CI on multiple versions of a product as we may need to patch a clients version. – dnolan May 11 '11 at 09:42

1 Answers1

1

It should be possible to create a TeamCity build for trunk & each branch, with the integration with SQL Compare command line & SQL Data Compare command line.

David Atkinson
  • 5,759
  • 2
  • 28
  • 35
  • How can I get the list of static data tables (set within the SQL management studio)? These are required when doing the data compare. – Michael Blake Apr 11 '11 at 11:03
  • Which version of SQL Data Compare are you using? The command line of the very latest version will automatically select just the static data tables as specified in SQL Source Control. – David Atkinson Apr 12 '11 at 08:14
  • SQL Compare Command Line V8.50.12.20. BTW, This is on hold until the source control with custom scripts is released. (To help with converting null columns etc) – Michael Blake Apr 12 '11 at 09:06
  • You'll need the latest for this behaviour. v9 should install side by side with v8. Please give it a go and let us know if it doesn't meet your expectations. – David Atkinson Apr 12 '11 at 10:32