I am trying to change the type of a column from VARCHAR
to INT
.
During the deployment, the database project will stop the deployment due to the "data loss" error:
RAISERROR (N'Rows were detected. The schema update is terminating because data loss might occur.', 16, 127)
I know the data is convertible and if I run a manual ALTER TABLE
script it will be fine. However, I cannot integrate that properly with this scenario to avoid the error during the deployment.
- What is your solution to resolve my problem?
- Is there a method to override this behaviour in a database project and for this particular case, use a custom script?