I have a Visual Studio Database Project, there seems to be little and sketchy documentation on this type of Project.
The issue: I want to rename a column.
Problem: The table I want to rename the column on has data in it, so every time I generate a script I end up with this piece of code that causes the script to bomb out because there is data in the table.
IF EXISTS (select top 1 1 from [dbo].[res_file_submission])
RAISERROR (N'Rows were detected. The schema update is terminating because data loss might occur.', 16, 127) WITH NOWAIT
I have no idea how to get round this, and I really don't believe deleting this line is the answer, I have deselected the 'Block incremental deployment if data loss might occur' option, but again this seems to make no difference.
UPDATE: The column has a constraint, which seems to be the cause.