Conditionally built objects and static data from a master

A SQL Server Management Studio add-in to source control your database in Subversion or Team Foundation Server.

Moderators: Chris Auckland, David Atkinson, sherr, PhilScrace

Conditionally built objects and static data from a master

Postby cmaslen » Thu May 05, 2011 9:20 am

Hi,

We have a couple of related scenarios where we'd like to maintain different versions of source controlled objects.

The first scenario is static data. For development we have a set of static data that is only appropriate for a local environment but not for test or production. An example here is environment specific configuration data that resides in the database. Another example is some test data that could be under source control for automated integration tests.

The other scenario is database objects. In our case we develop a platform product that uses some core tables. We also develop applications for the platform that have their own tables. We would like to build a database from source control for a given application or combination of applications depending on factors such as what the client has installed or what the developer is supporting.

Thanks in advance,
Christian
cmaslen
 
Posts: 1
Joined: Thu May 05, 2011 8:50 am

Conditionally built objects and static data from a master

Postby Sian.Williams » Mon May 09, 2011 11:24 am

Many thanks for your suggestions, I think they are reasonable however I don't believe they've been requested yet.

It would be great if you could add them to our uservoice site, where other users can vote for them to be added in the future.

http://redgate.uservoice.com/forums/390 ... ce-control

Thanks
--------------------------------------
Siân Williams
Red Gate Software
Tel: 0800 169 7433
sian.williams@red-gate.com
--------------------------------------
Sian.Williams
 
Posts: 32
Joined: Thu Aug 26, 2010 8:59 pm

Re: Conditionally built objects and static data from a master

Postby David Atkinson » Tue Jun 07, 2011 1:37 pm

cmaslen wrote:Hi,
The other scenario is database objects. In our case we develop a platform product that uses some core tables. We also develop applications for the platform that have their own tables. We would like to build a database from source control for a given application or combination of applications depending on factors such as what the client has installed or what the developer is supporting.

Thanks in advance,
Christian


Christian,

SQL Compare has a filter feature that lets you specify at a very granular level which objects to consider. Would it work for you to save a SQL Compare project for each client to use as the deployment mechanism?

David Atkinson
Product Manager
David Atkinson
 
Posts: 1124
Joined: Mon Dec 05, 2005 4:54 pm
Location: Twitter: @dtabase

Re: Conditionally built objects and static data from a master

Postby David Atkinson » Tue Jun 07, 2011 5:23 pm

cmaslen wrote:For development we have a set of static data that is only appropriate for a local environment but not for test or production. An example here is environment specific configuration data that resides in the database. Another example is some test data that could be under source control for automated integration tests.


Regarding this issue, it's actually one that our internal web team also have. They solve this using this automated process.

- 'gett' the scripts folder to a temporary folder using their source control command line
- sync the static data folder to their integration database using sqldatacompare.exe
- copy a 'test data' scripts folder on top of the temporary scripts folder
- sync the test data folder to their integration database using sqldatacompare.exe

That's pretty much it.

Using this technique you can have as many test data folders as you like, representing different clients or test scenarios.

David
David Atkinson
 
Posts: 1124
Joined: Mon Dec 05, 2005 4:54 pm
Location: Twitter: @dtabase


Return to SQL Source Control 2

Who is online

Users browsing this forum: No registered users and 0 guests