Search code examples
databasesvncontinuous-integrationteamcityredgate

How can I automatically upgrade databases with RedGate, TeamCity and SVN


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


Solution

  • 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.