I am developing a web application and of course on each phase I need to change the database schema on test server. When I tried to publish my code to my azure app service, it showed me an error:
Error : .Net SqlClient Data Provider: Msg 50000, Level 16, State 127, Line 6 Rows were detected. The schema update is terminating because data loss might occur
I understand, it wants to delete some columns and of course some columns should be deleted. My question is, how can I tell it to Drop the columns anyway?!
Update
I've removed all rows from affecting tables and the publishing went through. But there should be a way that I can keep my data and just drop that column.
besides, what is the solution on production?
update 2
I have found this post in msdn mentioning that: you can uncheck the "Block the update if data loss might occur" option under Data | Schema Compare | Schema compare options.
But I guess that is only there if you have a database project. how to do it on code first?