c# - Rows were detected. The schema update is terminating because data loss might occur -
i developing web application , of course on each phase need change database schema on test server. when tried publish code azure app service, showed me error:
error : .net sqlclient data provider: msg 50000, level 16, state 127, line 6 rows detected. schema update terminating because data loss might occur
i understand, wants delete columns , of course columns should deleted. question is, how can tell drop columns anyway?!
update
i've removed rows affecting tables , publishing went through. there should way can keep data , drop column.
besides, solution on production?
update 2
i have found this post in msdn mentioning that: you can uncheck "block update if data loss might occur" option under data | schema compare | schema compare options.
but guess there if have database project. how on code first?
look @ adding deployment script project. allows things t-sql blocked data integrity reasons on publish. i'm not positive if available specific type of project doing, i've used them in past blocked schema changes on database project.
Comments
Post a Comment