GoEddie / DeploymentContributorFilterer

MIT License
73 stars 35 forks source link

Issue with KeepTableColumns and existing data #5

Closed ErikEJ closed 6 years ago

ErikEJ commented 6 years ago

Hi, I am using the KeepTableComuns filter, works well.

However, I still get this in the script, as there are existing rows - is the only way around this to add the BlockOnPossibleDataLoss=false switch?

IF EXISTS (select top 1 1 from [dbo].[organisation])
    RAISERROR (N'Rows were detected. The schema update is terminating because data loss might occur.', 16, 127) WITH NOWAIT

GO

More of the script:


USE [$(DatabaseName)];

GO
/*
The column [dbo].[organisation].[o_pcust1] is being dropped, data loss could occur.
*/

IF EXISTS (select top 1 1 from [dbo].[organisation])
    RAISERROR (N'Rows were detected. The schema update is terminating because data loss might occur.', 16, 127) WITH NOWAIT
GO
PRINT N'Update complete.';

GO
ErikEJ commented 6 years ago

However, I still get this in the script, as there are existing rows - is the only way around this to add the BlockOnPossibleDataLoss=false switch?

Yes - (sorry to see this project abandoned, btw)