Database project

A

Aleksey Timonin

Hi guys!
I'll try to describe situation.
1. We have VS database project.
2. It contains table A.
3. In post-deployment script for the table A we have 'insert' statements
adding records to it.
4. Some of these records are adding temporary for development using only.

So the question is how can I make build not to perform these 'insert's in
case I create the production release build of the database?
Solutions like: remove the 'insert's your self before you make a build...
not relevant, because our solution release build script gets latest version
of all the projects (including database project) before it makes the build.
So for its correct work I should each time change it in source safe. Not
best solution at all...
I suppose that the solution is in using configuration varables. I would
check with wich configuration varable the build was running and perform just
right inserts for each case, but I don't know how can I do it in database
project scripts!

Please HEEEEELP!!!!
Thanks a lot
 
C

Ciaran O''Donnell

You could put in a simple if statement to check whether the code is running
on the development server or not. In SQL Server is the variable @@SERVERNAME.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top