This important feature shows up in a few places. This article discusses its role in Database Projects and in SQL Server Management Studio (SSMS); it defaults to true in both. This simple setting evaluates the delta between your desired schema and your actual schema and calculates if applying your desired schema would result in data loss. If the answer is “yes,” it stops.
An easy example is dropping a table or column. Doing so would clearly lose data. Another, perhaps less obvious, is reducing the range of a column’s data type, like from
INTtoTINYINT, where any existing value under zero or over 255 could be lost. These evaluations are done by the engine whenBlockOnPossibleDataLossis set toTrueand, as a result, you can trust that data in your database is not accidentally destroyed by publishing a schema.
The tricky part becomes dealing with database changes when there will be data loss. For that scenario, I’m not sure the database project approach offers anything significant over writing your own database change scripts.