I have a visual studio 2013 database project and when I deploy (as part of running a project in the solution) I get this error: "Line 6 Rows were detected. The schema update is terminating because data loss might occur."
I have found the offending line in the sql script.
The SQL Script is trying to change a column type from NVarchar to Varchar. But it does not need to do this - it's already Varchar in the database.
This works when I publish from the database project. It does not have a line for changing the column types. That's because it has already run and change the columns. There is no need to change the columns now.
But when I run (ctrl-F5) it builds my solution and tries to deploy. This is when I get the error.
1) Why does it deploy when I run? I can't find the setting and it does not happen to other developers on the same project. It must be a visual studio setting.
2) What connectString would it be using when it deploys from a run? Perhaps it's getting a connect string from another database instance.