Closed wangrandk closed 2 months ago
Sqlpackage safeguards you against potential data loss. If you wish to disable that, you can add /p:BlockOnPossibleDataLoss=false
to the arguments
input. Refer to this page for full documentation: https://learn.microsoft.com/sql/tools/sqlpackage/sqlpackage-publish
Closing this issue as @zijchen provided the answer - please feel free to file additional issues with other questions!
when you want to drop a column on an existing tabel with data, even i set all value of the coumn to NULL, but the workflow still gives error:
*** Could not deploy package. Warning SQL72015: The column [dbo].[employees].[Salary] is being dropped, data loss could occur. Warning SQL72030: The project and target databases have different collation settings. Deployment errors might occur. Error SQL72014: Core Microsoft SqlClient Data Provider: Msg 50000, Level 16, State 127, Line 6 Rows were detected. The schema update is terminating because data loss might occur. Error SQL72045: Script execution error. The executed script: IF EXISTS (SELECT TOP 1 1 FROM [dbo].[employees]) RAISERROR (N'Rows were detected. The schema update is terminating because data loss might occur.', 16, 127) WITH NOWAIT;
how can i fix it or make a work round? anyone has best practice for it?