Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS2010 Database Project Deployment, to fail if data loss may occur or not?

I have a database project for a web app, and currently I have it configured to fail if data loss may occur during deployment. I feel safer this way. However I've run into a problem. I actually need to deploy changes on some things where I'm okay with the possible data loss, i.e. shortening column lengths where nothing would actually get deleted, but the system thinks it would.

I have 2 questions.

The first is this: other than enabling or disabling the catch all go or no go, is there any way to have more granular control over this process, i.e. specify columns it's okay to drop or shorten? Is there any way to get more granular control of this process?

The second is, how do you guys handle these situations? Initially I had hoped that adding a pre-deployment script to drop the columns would be sufficient, however it seems to catch drops etc. in those files as well.

like image 747
Master Morality Avatar asked Apr 15 '11 15:04

Master Morality


1 Answers

  1. No there isn't any way to control it at a more granular way unfortunately.
  2. I disable it when I know I'll be deploying something that will cause data loss but is what I want. Then I re-enable it after. Also, I would always check the change script that comes out when deploying to production.
like image 194
LeWoody Avatar answered Oct 16 '22 22:10

LeWoody