Deploying Data Scripts
DavidWNAZ
Posts: 20 Bronze 1
Is there a way to deploy data only scripts (via migration scripts) to one environment, and not another within the same release definition? For example, we have some script to update production data, but not to TST. I know I can deploy directly to the production environment, but then the script is included in the next release to TST. We are using SQL Source Control to deploy to VSTS.
TIA,
David W
TIA,
David W
Best Answer
-
SamTouray Posts: 13 Bronze 2What about making your migration scripts environment aware e.g.
IF (@@SERVERNAME = 'MyProductionServer')
Assuming your database doesn't move servers in the meantime. I wouldn't use this technique for business logic in application code i.e. in a stored procedure, but for a one-off script I think it's Ok?