By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,566 Members | 1,734 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,566 IT Pros & Developers. It's quick & easy.

Database project

P: n/a
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
Jul 14 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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.

--
Ciaran O''Donnell
http://wannabedeveloper.spaces.live.com
"Aleksey Timonin" wrote:
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
Jul 14 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.